projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c7259c
)
io_uring: fix wrong arm_poll error handling
author
Pavel Begunkov
<asml.silence@gmail.com>
Mon, 29 Aug 2022 13:30:23 +0000
(14:30 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:30:06 +0000
(10:30 +0200)
[ upstream commmit
9d2ad2947a53abf5e5e6527a9eeed50a3a4cbc72
]
Leaving ip.error set when a request was punted to task_work execution is
problematic, don't forget to clear it.
Fixes: aa43477b04025 ("io_uring: poll rework")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/a6c84ef4182c6962380aebe11b35bdcb25b0ccfb.1655852245.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
[pavel: backport]
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index 2eb33d0fa55043790d0ed26e1db07cc316ffb2e0..be04b0f0872baf1a94b6463f1c9233e73be53b4e 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-5627,8
+5627,10
@@
static int __io_arm_poll_handler(struct io_kiocb *req,
if (mask) {
/* can't multishot if failed, just queue the event we've got */
- if (unlikely(ipt->error || !ipt->nr_entries))
+ if (unlikely(ipt->error || !ipt->nr_entries))
{
poll->events |= EPOLLONESHOT;
+ ipt->error = 0;
+ }
__io_poll_execute(req, mask);
return 0;
}