]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 09:57:00 +0000 (11:57 +0200)
commit37f2aa162c4dd56d02ff7f40feb2b2c8ab96d6a2
tree202e16a6039a591894ceb5d2f56dbeb1c8331947
parent22842258d6138b330be06ee41feff5bc552738f3
io_uring: don't check unrelated req->open.how in accept request

BugLink: https://bugs.launchpad.net/bugs/1969110
[ Upstream commit adf3a9e9f556613197583a1884f0de40a8bb6fb9 ]

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: aaa4db12ef7b ("io_uring: accept directly into fixed file table")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 1323976e9448ace3af334235e4e0c1858119e782)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/io_uring.c