diff --git a/fs/io_uring.c b/fs/io_uring.c index 4833b68f1a1cc..6c356b9e87b39 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1009,6 +1009,8 @@ static int __io_sq_thread_acquire_mm(struct io_ring_ctx *ctx) { struct mm_struct *mm; + if (current->flags & PF_EXITING) + return -EFAULT; if (current->mm) return 0;