io_uring/poll: add hash if ready poll request can't complete inline
authorJens Axboe <axboe@kernel.dk>
Mon, 9 Jan 2023 21:46:10 +0000 (14:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:58:10 +0000 (11:58 +0100)
commit4ad6c063541665c407d17e1faf2fe4f04e947dcc
treee10173f672b74d2e9805c0772737d801089ea91f
parent78c8b66a697abed34c34a37eaa7fc3865b4f3ec4
io_uring/poll: add hash if ready poll request can't complete inline

commit febb985c06cb6f5fac63598c0bffd4fd823d110d upstream.

If we don't, then we may lose access to it completely, leading to a
request leak. This will eventually stall the ring exit process as
well.

Cc: stable@vger.kernel.org
Fixes: 49f1c68e048f ("io_uring: optimise submission side poll_refs")
Reported-and-tested-by: syzbot+6c95df01470a47fc3af4@syzkaller.appspotmail.com
Link: https://lore.kernel.org/io-uring/0000000000009f829805f1ce87b2@google.com/
Suggested-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/poll.c