Skip to content

Commit f1684a8

Browse files
isilencedinguyen702
authored andcommitted
io_uring: fix wrong arm_poll error handling
[ upstream commmit 9d2ad29 ] Leaving ip.error set when a request was punted to task_work execution is problematic, don't forget to clear it. Fixes: aa43477 ("io_uring: poll rework") Signed-off-by: Pavel Begunkov <[email protected]> Link: https://lore.kernel.org/r/a6c84ef4182c6962380aebe11b35bdcb25b0ccfb.1655852245.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <[email protected]> [pavel: backport] Signed-off-by: Pavel Begunkov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6a3a747 commit f1684a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/io_uring.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5627,8 +5627,10 @@ static int __io_arm_poll_handler(struct io_kiocb *req,
56275627

56285628
if (mask) {
56295629
/* can't multishot if failed, just queue the event we've got */
5630-
if (unlikely(ipt->error || !ipt->nr_entries))
5630+
if (unlikely(ipt->error || !ipt->nr_entries)) {
56315631
poll->events |= EPOLLONESHOT;
5632+
ipt->error = 0;
5633+
}
56325634
__io_poll_execute(req, mask);
56335635
return 0;
56345636
}

0 commit comments

Comments
 (0)