io_uring: don't check unrelated req->open.how in accept request io_uring-5.17 io_uring-5.17-2022-03-18
authorJens Axboe <axboe@kernel.dk>
Mon, 14 Mar 2022 23:26:19 +0000 (17:26 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 14 Mar 2022 23:29:43 +0000 (17:29 -0600)
commit9ccd435817a22cb8c7338c9ba6467ee233d0b22c
tree67cd6b51721efa3d22aa5f243cfb42db9bdcbc1b
parent80912cef18f16f8fe59d1fb9548d4364342be360
io_uring: don't check unrelated req->open.how in accept request

Looks like a victim of too much copy/paste, we should not be looking
at req->open.how in accept. The point is to check CLOEXEC and error
out, which we don't invalid direct descriptors on exec. Hence any
attempt to get a direct descriptor with CLOEXEC is invalid.

No harm is done here, outside of potentially causing a spurious -EINVAL
for direct accept requests.

Fixes: aaa4db12ef7b ("io_uring: accept directly into fixed file table")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c