]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: don't attempt to IOPOLL for MSG_RING requests
authorJens Axboe <axboe@kernel.dk>
Tue, 17 May 2022 18:32:05 +0000 (12:32 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 17 May 2022 18:46:04 +0000 (12:46 -0600)
commitfe6d3c7ca8d45f0e321ce36eadf5f18038f1f41f
treedc1f14538386a4b510d2217ce8a2d3876f020030
parentddff90f6a61cb0ba5d4d3dfc402bbaf535db22de
io_uring: don't attempt to IOPOLL for MSG_RING requests

We gate whether to IOPOLL for a request on whether the opcode is allowed
on a ring setup for IOPOLL and if it's got a file assigned. MSG_RING
is the only one that allows a file yet isn't pollable, it's merely
supported to allow communication on an IOPOLL ring, not because we can
poll for completion of it.

Put the assigned file early and clear it, so we don't attempt to poll
for it.

Reported-by: syzbot+1a0a53300ce782f8b3ad@syzkaller.appspotmail.com
Fixes: 40634cd56718 ("io_uring: defer msg-ring file validity check until command issue")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c