Commit bee749b
io_uring: fix files cancellation
io_uring_cancel_files()'s task check condition mistakenly got flipped.
1. There can't be a request in the inflight list without
IO_WQ_WORK_FILES, kill this check to keep the whole condition simpler.
2. Also, don't call the function for files==NULL to not do such a check,
all that staff is already handled well by its counter part,
__io_uring_cancel_task_requests().
With that just flip the task check.
Also, it iowq-cancels all request of current task there, don't forget to
set right ->files into struct io_task_cancel.
Fixes: c1973b3 ("io_uring: cancel only requests of current task")
Reported-by: syzbot+c0d52d0b3c0c3ffb9525@syzkaller.appspotmail.com
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent ac0648a commit bee749b
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8688 | 8688 | | |
8689 | 8689 | | |
8690 | 8690 | | |
8691 | | - | |
| 8691 | + | |
8692 | 8692 | | |
8693 | 8693 | | |
8694 | 8694 | | |
8695 | 8695 | | |
8696 | 8696 | | |
8697 | 8697 | | |
8698 | | - | |
8699 | | - | |
| 8698 | + | |
8700 | 8699 | | |
8701 | 8700 | | |
8702 | 8701 | | |
| |||
8768 | 8767 | | |
8769 | 8768 | | |
8770 | 8769 | | |
8771 | | - | |
8772 | 8770 | | |
8773 | 8771 | | |
8774 | 8772 | | |
| 8773 | + | |
| 8774 | + | |
8775 | 8775 | | |
8776 | 8776 | | |
8777 | 8777 | | |
| |||
0 commit comments