diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-01-26 21:23:04 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-01-26 21:23:04 +0100 |
commit | 5cf9ad0e6b164a90581a59609dbf5bda3f5a089c (patch) | |
tree | 8840ec2f91a021d3067251c32d0b6ad12179a6d3 | |
parent | Merge tag 'block-5.5-2020-01-26' of git://git.kernel.dk/linux-block (diff) | |
parent | io_uring: don't cancel all work on process exit (diff) | |
download | linux-5cf9ad0e6b164a90581a59609dbf5bda3f5a089c.tar.xz linux-5cf9ad0e6b164a90581a59609dbf5bda3f5a089c.zip |
Merge tag 'io_uring-5.5-2020-01-26' of git://git.kernel.dk/linux-block
Pull io_uring fixes from Jens Axboe:
"Fix for two regressions in this cycle, both reported by the postgresql
use case.
One removes the added restriction on who can submit IO, making it
possible for rings shared across forks to do so. The other fixes an
issue for the same kind of use case, where one exiting process would
cancel all IO"
* tag 'io_uring-5.5-2020-01-26' of git://git.kernel.dk/linux-block:
io_uring: don't cancel all work on process exit
Revert "io_uring: only allow submit from owning task"
-rw-r--r-- | fs/io_uring.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 5953d7f13690..e54556b0fcc6 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -5044,10 +5044,6 @@ static int io_uring_flush(struct file *file, void *data) struct io_ring_ctx *ctx = file->private_data; io_uring_cancel_files(ctx, data); - if (fatal_signal_pending(current) || (current->flags & PF_EXITING)) { - io_cqring_overflow_flush(ctx, true); - io_wq_cancel_all(ctx->io_wq); - } return 0; } @@ -5161,12 +5157,6 @@ SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, u32, to_submit, } else if (to_submit) { struct mm_struct *cur_mm; - if (current->mm != ctx->sqo_mm || - current_cred() != ctx->creds) { - ret = -EPERM; - goto out; - } - to_submit = min(to_submit, ctx->sq_entries); mutex_lock(&ctx->uring_lock); /* already have mm, so io_submit_sqes() won't try to grab it */ |