Skip to content

Commit

Permalink
Merge tag 'io_uring-5.19-2022-07-09' of git://git.kernel.dk/linux-block
Browse files Browse the repository at this point in the history
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
  • Loading branch information
torvalds committed Jul 10, 2022
2 parents 2fbd36d + d785a77 commit d9919d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -7973,6 +7973,9 @@ static int io_files_update_with_index_alloc(struct io_kiocb *req,
struct file *file;
int ret, fd;

if (!req->ctx->file_data)
return -ENXIO;

for (done = 0; done < req->rsrc_update.nr_args; done++) {
if (copy_from_user(&fd, &fds[done], sizeof(fd))) {
ret = -EFAULT;
Expand Down

0 comments on commit d9919d4

Please sign in to comment.