projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33ce2af
)
io_uring: remove double poll on poll update
author
Pavel Begunkov
<asml.silence@gmail.com>
Wed, 15 Dec 2021 22:08:44 +0000
(22:08 +0000)
committer
Jens Axboe
<axboe@kernel.dk>
Tue, 28 Dec 2021 17:51:14 +0000
(09:51 -0800)
Before updating a poll request we should remove it from poll queues,
including the double poll entry.
Fixes: b69de288e913 ("io_uring: allow events and user_data update of running poll requests")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/ac39e7f80152613603b8a6cc29a2b6063ac2434f.1639605189.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index 1f2341d87588fe8f1868683b0b840e396aac8db9..39d50124bdea3da49391bde4ed565cc6f04208a7 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-5980,6
+5980,7
@@
static int io_poll_update(struct io_kiocb *req, unsigned int issue_flags)
* update those. For multishot, if we're racing with completion, just
* let completion re-add it.
*/
+ io_poll_remove_double(preq);
completing = !__io_poll_remove_one(preq, &preq->poll, false);
if (completing && (preq->poll.events & EPOLLONESHOT)) {
ret = -EALREADY;