diff options
| author | Ming Lei <tom.leiming@gmail.com> | 2026-04-10 20:41:36 +0800 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-04-10 07:02:37 -0600 |
| commit | 36446de0c30c62b9d89502fd36c4904996d86ecd (patch) | |
| tree | e9a40c35ce40da3fec1246c5126c929b27a2b4ac /rust/kernel/interop/git@git.tavy.me:linux-stable.git | |
| parent | 0a42ca4d2bff6306dd574a7897258fd02c2e6930 (diff) | |
ublk: fix tautological comparison warning in ublk_ctrl_reg_buf
On 32-bit architectures, 'unsigned long size' can never exceed
UBLK_SHMEM_BUF_SIZE_MAX (1ULL << 32), causing a tautological
comparison warning. Validate buf_reg.len (__u64) directly before
using it, and consolidate all input validation into a single check.
Also remove the unnecessary local variables 'addr' and 'size' since
buf_reg.addr and buf_reg.len can be used directly.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604101952.3NOzqnu9-lkp@intel.com/
Fixes: 23b3b6f0b584 ("ublk: widen ublk_shmem_buf_reg.len to __u64 for 4GB buffer support")
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Link: https://patch.msgid.link/20260410124136.3983429-1-tom.leiming@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/kernel/interop/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
