]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: update res mask in io_poll_check_events
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 17 Nov 2022 18:40:14 +0000 (18:40 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 17 Nov 2022 19:33:33 +0000 (12:33 -0700)
commita836d2da522f8cabd1ad69e950be69e0e7034b7a
tree4f37a230e1db46909e62e14b0074e6c965fbb76a
parentc7da0dbb67ba65e8a8fc139e512cae129b30a84f
io_uring: update res mask in io_poll_check_events

When io_poll_check_events() collides with someone attempting to queue a
task work, it'll spin for one more time. However, it'll continue to use
the mask from the first iteration instead of updating it. For example,
if the first wake up was a EPOLLIN and the second EPOLLOUT, the
userspace will not get EPOLLOUT in time.

Clear the mask for all subsequent iterations to force vfs_poll().

Cc: stable@vger.kernel.org
Fixes: e814270056832 ("io_uring: poll rework")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/2dac97e8f691231049cb259c4ae57e79e40b537c.1668710222.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/poll.c