aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/include/class_to_string.h
diff options
context:
space:
mode:
authorCaleb Sander Mateos <[email protected]>2025-11-11 19:15:29 +0000
committerJens Axboe <[email protected]>2025-11-12 15:25:33 +0000
commit2d0e88f3fd1dcb37072d499c36162baf5b009d41 (patch)
treebb645430bf4a20274f1264ffa2eed8c57067ce09 /security/selinux/include/class_to_string.h
parentio_uring/query: return number of available queries (diff)
downloadkernel-2d0e88f3fd1dcb37072d499c36162baf5b009d41.tar.gz
kernel-2d0e88f3fd1dcb37072d499c36162baf5b009d41.zip
io_uring/rsrc: don't use blk_rq_nr_phys_segments() as number of bvecs
io_buffer_register_bvec() currently uses blk_rq_nr_phys_segments() as the number of bvecs in the request. However, bvecs may be split into multiple segments depending on the queue limits. Thus, the number of segments may overestimate the number of bvecs. For ublk devices, the only current users of io_buffer_register_bvec(), virt_boundary_mask, seg_boundary_mask, max_segments, and max_segment_size can all be set arbitrarily by the ublk server process. Set imu->nr_bvecs based on the number of bvecs the rq_for_each_bvec() loop actually yields. However, continue using blk_rq_nr_phys_segments() as an upper bound on the number of bvecs when allocating imu to avoid needing to iterate the bvecs a second time. Link: https://lore.kernel.org/io-uring/[email protected]/ Signed-off-by: Caleb Sander Mateos <[email protected]> Fixes: 27cb27b6d5ea ("io_uring: add support for kernel registered bvecs") Reviewed-by: Ming Lei <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'security/selinux/include/class_to_string.h')
0 files changed, 0 insertions, 0 deletions