OSDN Git Service

io_uring: don't modify req->poll for rw
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 17 May 2021 11:43:34 +0000 (12:43 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 17 May 2021 13:28:48 +0000 (07:28 -0600)
commit7a274727702cc07d27cdebd36d1d5132abeea12f
treeaefa2d62f367048dfe415f13a4e506ff38f2b571
parent489809e2e22b3dedc0737163d97eb2b574137b42
io_uring: don't modify req->poll for rw

__io_queue_proc() is used by both poll and apoll, so we should not
access req->poll directly but selecting right struct io_poll_iocb
depending on use case.

Reported-and-tested-by: syzbot+a84b8783366ecb1c65d0@syzkaller.appspotmail.com
Fixes: ea6a693d862d ("io_uring: disable multishot poll for double poll add cases")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/4a6a1de31142d8e0250fe2dfd4c8923d82a5bbfc.1621251795.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c