]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: don't check unrelated req->open.how in accept request
authorJens Axboe <axboe@kernel.dk>
Mon, 14 Mar 2022 23:26:19 +0000 (17:26 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 18 Mar 2022 16:57:19 +0000 (10:57 -0600)
commit1a48b9ee2bc2f825ed373802c4328fba975bb991
tree3a5e03a64eeba3d1561794d698235aea4e6cf540
parent4d5bae2cbb6b4333a05860e9cb1c91a37d1b94ee
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, as req->open.how.flags overlaps with
req->accept.flags, but it's very confusing and might change if either of
those command structs are modified.

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