Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'io_uring-5.11-2021-02-05' of git://git.kernel.dk/linux-block

Pull io_uring fixes from Jens Axboe:
"Two small fixes that should go into 5.11:

- task_work resource drop fix (Pavel)

- identity COW fix (Xiaoguang)"

* tag 'io_uring-5.11-2021-02-05' of git://git.kernel.dk/linux-block:
io_uring: drop mm/files between task_work_submit
io_uring: don't modify identity's files uncess identity is cowed

+3 -6
+3 -6
fs/io_uring.c
··· 2205 2205 else 2206 2206 __io_req_task_cancel(req, -EFAULT); 2207 2207 mutex_unlock(&ctx->uring_lock); 2208 + 2209 + if (ctx->flags & IORING_SETUP_SQPOLL) 2210 + io_sq_thread_drop_mm_files(); 2208 2211 } 2209 2212 2210 2213 static void io_req_task_submit(struct callback_head *cb) ··· 8985 8982 8986 8983 if ((ctx->flags & IORING_SETUP_SQPOLL) && ctx->sq_data) { 8987 8984 atomic_dec(&task->io_uring->in_idle); 8988 - /* 8989 - * If the files that are going away are the ones in the thread 8990 - * identity, clear them out. 8991 - */ 8992 - if (task->io_uring->identity->files == files) 8993 - task->io_uring->identity->files = NULL; 8994 8985 io_sq_thread_unpark(ctx->sq_data); 8995 8986 } 8996 8987 }