summaryrefslogtreecommitdiff
path: root/fs/proc
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-11-11 20:38:53 +0300
committerJens Axboe <axboe@kernel.dk>2020-11-11 20:42:41 +0300
commit88ec3211e46344a7d10cf6cb5045f839f7785f8e (patch)
tree8f1ba2a9d3b3411b2484e16f1f736b1924a7cc30 /fs/proc
parent9a472ef7a3690ac0b77ebfb04c88fa795de2adea (diff)
downloadlinux-88ec3211e46344a7d10cf6cb5045f839f7785f8e.tar.xz
io_uring: round-up cq size before comparing with rounded sq size
If an application specifies IORING_SETUP_CQSIZE to set the CQ ring size to a specific size, we ensure that the CQ size is at least that of the SQ ring size. But in doing so, we compare the already rounded up to power of two SQ size to the as-of yet unrounded CQ size. This means that if an application passes in non power of two sizes, we can return -EINVAL when the final value would've been fine. As an example, an application passing in 100/100 for sq/cq size should end up with 128 for both. But since we round the SQ size first, we compare the CQ size of 100 to 128, and return -EINVAL as that is too small. Cc: stable@vger.kernel.org Fixes: 33a107f0a1b8 ("io_uring: allow application controlled CQ ring size") Reported-by: Dan Melnic <dmm@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/proc')
0 files changed, 0 insertions, 0 deletions