Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring/net: correct type for min_not_zero() cast

The kernel test robot reports that after a recent change, the signedness
of a min_not_zero() compare is now incorrect. Fix that up and cast to
the right type.

Fixes: 429884ff35f7 ("io_uring/kbuf: use struct io_br_sel for multiple buffers picking")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509020426.WJtrdwOU-lkp@intel.com/
Signed-off-by: Jens Axboe <axboe@kernel.dk>

+1 -1
+1 -1
io_uring/net.c
··· 1118 1118 if (sel->val) 1119 1119 arg.max_len = sel->val; 1120 1120 else if (kmsg->msg.msg_inq > 1) 1121 - arg.max_len = min_not_zero(sel->val, (size_t) kmsg->msg.msg_inq); 1121 + arg.max_len = min_not_zero(sel->val, (ssize_t) kmsg->msg.msg_inq); 1122 1122 1123 1123 /* if mshot limited, ensure we don't go over */ 1124 1124 if (sr->flags & IORING_RECV_MSHOT_LIM)