io_uring: fix wrong arm_poll error handling
[ upstream commmit9d2ad2947a
] Leaving ip.error set when a request was punted to task_work execution is problematic, don't forget to clear it. Fixes:aa43477b04
("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>
This commit is contained in:
Родитель
6c7259c837
Коммит
182dc3aa5a
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче