]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix multishot accept request leaks
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 17 Nov 2022 18:40:16 +0000 (18:40 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 17 Nov 2022 19:33:33 +0000 (12:33 -0700)
commitcda6604ea663b762dc928dce324e87181c9ef29d
tree0220e27b172b21d1e4e687064fae3cb26a115038
parentb9765908ec7ed0665f09aec5382444a819f191ef
io_uring: fix multishot accept request leaks

Having REQ_F_POLLED set doesn't guarantee that the request is
executed as a multishot from the polling path. Fortunately for us, if
the code thinks it's multishot issue when it's not, it can only ask to
skip completion so leaking the request. Use issue_flags to mark
multipoll issues.

Cc: stable@vger.kernel.org
Fixes: f673c3117f662 ("io_uring: add IORING_ACCEPT_MULTISHOT for accept")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/7700ac57653f2823e30b34dc74da68678c0c5f13.1668710222.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring.h
io_uring/io_uring.c
io_uring/io_uring.h
io_uring/net.c