Skip to content

Commit d9919d4

Browse files
committed
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
2 parents 2fbd36d + d785a77 commit d9919d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/io_uring.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7973,6 +7973,9 @@ static int io_files_update_with_index_alloc(struct io_kiocb *req,
79737973
struct file *file;
79747974
int ret, fd;
79757975

7976+
if (!req->ctx->file_data)
7977+
return -ENXIO;
7978+
79767979
for (done = 0; done < req->rsrc_update.nr_args; done++) {
79777980
if (copy_from_user(&fd, &fds[done], sizeof(fd))) {
79787981
ret = -EFAULT;

0 commit comments

Comments
 (0)