summaryrefslogtreecommitdiffstats
path: root/io_uring
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2023-01-23 14:37:13 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-10 09:34:03 +0100
commitc981a035dff031925855c0195e66e157d3ea1e76 (patch)
treef4b29f9575628ced70ff4f947904933895c188c1 /io_uring
parentf09fb7ff2ab27fb45f03884e489f5adf2cbff333 (diff)
downloadlinux-stable-c981a035dff031925855c0195e66e157d3ea1e76.tar.gz
linux-stable-c981a035dff031925855c0195e66e157d3ea1e76.tar.bz2
linux-stable-c981a035dff031925855c0195e66e157d3ea1e76.zip
io_uring: use user visible tail in io_uring_poll()
commit c10bb64684813a326174c3eebcafb3ee5af52ca3 upstream. We return POLLIN from io_uring_poll() depending on whether there are CQEs for the userspace, and so we should use the user visible tail pointer instead of a transient cached value. Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/228ffcbf30ba98856f66ffdb9a6a60ead1dd96c0.1674484266.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/io_uring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 862e05e6691d..dc5a8c31d703 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -2653,7 +2653,7 @@ static __poll_t io_uring_poll(struct file *file, poll_table *wait)
* pushs them to do the flush.
*/
- if (io_cqring_events(ctx) || io_has_work(ctx))
+ if (__io_cqring_events_user(ctx) || io_has_work(ctx))
mask |= EPOLLIN | EPOLLRDNORM;
return mask;