summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorYao Sang <sangyao@kylinos.cn>2026-06-03 14:10:44 +0800
committerJakub Kicinski <kuba@kernel.org>2026-06-08 17:22:24 -0700
commit2365343f4aad3e1b1e7a2e87e98cf66d5e590589 (patch)
tree183752eb04b3b2782d245ea32d9971028d33c3bc /include/linux/timerqueue.h
parentf2bb3434544454099a5b6dec213567267b05d79d (diff)
net/mlx4: avoid GCC 10 __bad_copy_from() false positive
mlx4_init_user_cqes() fills a scratch buffer with the CQE initialization pattern and then copies from that buffer to userspace. In the single-copy path, the copy length is array_size(entries, cqe_size), but the scratch buffer is allocated with PAGE_SIZE. GCC 10 does not carry the branch invariant strongly enough through the object size checks and falsely triggers __bad_copy_from(). Size the scratch buffer to the actual copy length for the active path, keep array_size() for the single-copy case, and retain a WARN_ON_ONCE() guard for the PAGE_SIZE invariant before allocating the buffer. Fixes: f69bf5dee7ef ("net/mlx4: Use array_size() helper in copy_to_user()") Signed-off-by: Yao Sang <sangyao@kylinos.cn> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions