Commit e9c02d68 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'io_uring-5.10-2020-11-07' of git://git.kernel.dk/linux-block

Pull io_uring fixes from Jens Axboe:
 "A set of fixes for io_uring:

   - SQPOLL cancelation fixes

   - Two fixes for the io_identity COW

   - Cancelation overflow fix (Pavel)

   - Drain request cancelation fix (Pavel)

   - Link timeout race fix (Pavel)"

* tag 'io_uring-5.10-2020-11-07' of git://git.kernel.dk/linux-block:
  io_uring: fix link lookup racing with link timeout
  io_uring: use correct pointer for io_uring_show_cred()
  io_uring: don't forget to task-cancel drained reqs
  io_uring: fix overflowed cancel w/ linked ->files
  io_uring: drop req/tctx io_identity separately
  io_uring: ensure consistent view of original task ->mm from SQPOLL
  io_uring: properly handle SQPOLL request cancelations
  io-wq: cancel request if it's asking for files and we don't have them
parents af6e7de0 9a472ef7
...@@ -482,6 +482,10 @@ static void io_impersonate_work(struct io_worker *worker, ...@@ -482,6 +482,10 @@ static void io_impersonate_work(struct io_worker *worker,
current->files = work->identity->files; current->files = work->identity->files;
current->nsproxy = work->identity->nsproxy; current->nsproxy = work->identity->nsproxy;
task_unlock(current); task_unlock(current);
if (!work->identity->files) {
/* failed grabbing files, ensure work gets cancelled */
work->flags |= IO_WQ_WORK_CANCEL;
}
} }
if ((work->flags & IO_WQ_WORK_FS) && current->fs != work->identity->fs) if ((work->flags & IO_WQ_WORK_FS) && current->fs != work->identity->fs)
current->fs = work->identity->fs; current->fs = work->identity->fs;
......
This diff is collapsed.
...@@ -30,7 +30,8 @@ struct io_uring_task { ...@@ -30,7 +30,8 @@ struct io_uring_task {
struct percpu_counter inflight; struct percpu_counter inflight;
struct io_identity __identity; struct io_identity __identity;
struct io_identity *identity; struct io_identity *identity;
bool in_idle; atomic_t in_idle;
bool sqpoll;
}; };
#if defined(CONFIG_IO_URING) #if defined(CONFIG_IO_URING)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment