io_uring: cancel by ->task not pid

For an exiting process it tries to cancel all its inflight requests. Use
req->task to match such instead of work.pid. We always have req->task
set, and it will be valid because we're matching only current exiting
task.

Also, remove work.pid and everything related, it's useless now.

Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Pavel Begunkov
2020-06-15 10:33:14 +03:00
committed by Jens Axboe
parent 4dd2824d6d
commit 801dd57bd1
2 changed files with 6 additions and 11 deletions

View File

@@ -90,7 +90,6 @@ struct io_wq_work {
const struct cred *creds;
struct fs_struct *fs;
unsigned flags;
pid_t task_pid;
};
static inline struct io_wq_work *wq_next_work(struct io_wq_work *work)