diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-07-10 09:14:54 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-07-10 09:14:54 -0700 |
commit | d9919d43cbf6790d2bc0c0a2743c51fc25f26919 (patch) | |
tree | ca6743642cd86d8c1707477a7b059414a24e7736 /fs | |
parent | 2fbd36dfae40cc90ba6a4761e0efff62e4d919fe (diff) | |
parent | d785a773bed966a75ca1f11d108ae1897189975b (diff) |
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
Diffstat (limited to 'fs')
-rw-r--r-- | fs/io_uring.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index cddc0e8490af..a01ea49f3017 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -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; |