Commit d9919d43 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'io_uring-5.19-2022-07-09' of git://git.kernel.dk/linux-block

Pull io_uring fix from Jens Axboe:
 "A single fix for an issue that came up yesterday that we should plug
  for -rc6.

  This is a regression introduced in this cycle"

* tag 'io_uring-5.19-2022-07-09' of git://git.kernel.dk/linux-block:
  io_uring: check that we have a file table when allocating update slots
parents 2fbd36df d785a773
...@@ -7973,6 +7973,9 @@ static int io_files_update_with_index_alloc(struct io_kiocb *req, ...@@ -7973,6 +7973,9 @@ static int io_files_update_with_index_alloc(struct io_kiocb *req,
struct file *file; struct file *file;
int ret, fd; int ret, fd;
if (!req->ctx->file_data)
return -ENXIO;
for (done = 0; done < req->rsrc_update.nr_args; done++) { for (done = 0; done < req->rsrc_update.nr_args; done++) {
if (copy_from_user(&fd, &fds[done], sizeof(fd))) { if (copy_from_user(&fd, &fds[done], sizeof(fd))) {
ret = -EFAULT; ret = -EFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment