Skip to content

Commit

Permalink
Merge tag 'io_uring-5.5-2020-01-26' of git://git.kernel.dk/linux-block
Browse files Browse the repository at this point in the history
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"
  • Loading branch information
torvalds committed Jan 26, 2020
2 parents 9dbca16 + ebe1002 commit 5cf9ad0
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 5cf9ad0

Please sign in to comment.