projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd99c71
)
io_uring: fix missing set of EPOLLONESHOT for CQ ring overflow
author
Hao Xu
<haoxu@linux.alibaba.com>
Wed, 22 Sep 2021 10:12:37 +0000
(18:12 +0800)
committer
Jens Axboe
<axboe@kernel.dk>
Fri, 24 Sep 2021 16:24:34 +0000
(10:24 -0600)
We should set EPOLLONESHOT if cqring_fill_event() returns false since
io_poll_add() decides to put req or not by it.
Fixes:
5082620fb2ca
("io_uring: terminate multishot poll for CQ ring overflow")
Signed-off-by: Hao Xu <haoxu@linux.alibaba.com>
Link:
https://lore.kernel.org/r/20210922101238.7177-3-haoxu@linux.alibaba.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
43530aa
..
ac0c06d
100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-5337,8
+5337,10
@@
static bool __io_poll_complete(struct io_kiocb *req, __poll_t mask)
}
if (req->poll.events & EPOLLONESHOT)
flags = 0;
- if (!io_cqring_fill_event(ctx, req->user_data, error, flags))
+ if (!io_cqring_fill_event(ctx, req->user_data, error, flags)) {
+ req->poll.events |= EPOLLONESHOT;
flags = 0;
+ }
if (flags & IORING_CQE_F_MORE)
ctx->cq_extra++;