Skip to content

Commit aec18a5

Browse files
isilenceaxboe
authored andcommitted
io_uring: drop mm/files between task_work_submit
Since SQPOLL task can be shared and so task_work entries can be a mix of them, we need to drop mm and files before trying to issue next request. Cc: [email protected] # 5.10+ Signed-off-by: Pavel Begunkov <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent d7e10d4 commit aec18a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/io_uring.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2205,6 +2205,9 @@ static void __io_req_task_submit(struct io_kiocb *req)
22052205
else
22062206
__io_req_task_cancel(req, -EFAULT);
22072207
mutex_unlock(&ctx->uring_lock);
2208+
2209+
if (ctx->flags & IORING_SETUP_SQPOLL)
2210+
io_sq_thread_drop_mm_files();
22082211
}
22092212

22102213
static void io_req_task_submit(struct callback_head *cb)

0 commit comments

Comments
 (0)