]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fail poll arm on queue proc failure
authorJens Axboe <axboe@kernel.dk>
Tue, 11 Aug 2020 15:50:19 +0000 (09:50 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 12 Aug 2020 14:29:40 +0000 (08:29 -0600)
commite4e8c2e891f807e3a41c135f5550012f15c2d520
tree0af7dd70d9b6f2fce3b680da798baa5212a21dee
parentacb053e1893e9e08409faa96d5e556d89d55b13f
io_uring: fail poll arm on queue proc failure

Check the ipt.error value, it must have been either cleared to zero or
set to another error than the default -EINVAL if we don't go through the
waitqueue proc addition. Just give up on poll at that point and return
failure, this will fallback to async work.

io_poll_add() doesn't suffer from this failure case, as it returns the
error value directly.

Cc: stable@vger.kernel.org # v5.7+
Reported-by: syzbot+a730016dc0bdce4f6ff5@syzkaller.appspotmail.com
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c