mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
Merge 4329490a78 ("io_uring_enter(): don't leave f.flags uninitialized") into android-mainline
Steps on the way to 5.19-rc1 Resolves conflicts in: fs/io_uring.c Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ia9416cc0166700be89845df1efa82a8c1451d156
This commit is contained in:
@@ -12053,14 +12053,14 @@ SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, u32, to_submit,
|
||||
return -EINVAL;
|
||||
fd = array_index_nospec(fd, IO_RINGFD_REG_MAX);
|
||||
f.file = tctx->registered_rings[fd];
|
||||
if (unlikely(!f.file))
|
||||
return -EBADF;
|
||||
f.flags = 0;
|
||||
} else {
|
||||
f = fdget(fd);
|
||||
if (unlikely(!f.file))
|
||||
return -EBADF;
|
||||
}
|
||||
|
||||
if (unlikely(!f.file))
|
||||
return -EBADF;
|
||||
|
||||
ret = -EOPNOTSUPP;
|
||||
if (unlikely(f.file->f_op != &io_uring_fops))
|
||||
goto out_fput;
|
||||
@@ -12158,8 +12158,7 @@ iopoll_locked:
|
||||
out:
|
||||
percpu_ref_put(&ctx->refs);
|
||||
out_fput:
|
||||
if (!(flags & IORING_ENTER_REGISTERED_RING))
|
||||
fdput(f);
|
||||
fdput(f);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user