• Jens Axboe's avatar
    io_uring: io_wq_create() returns an error pointer, not NULL · 975c99a5
    Jens Axboe authored
    syzbot reported an issue where we crash at setup time if failslab is
    used. The issue is that io_wq_create() returns an error pointer on
    failure, not NULL. Hence io_uring thought the io-wq was setup just
    fine, but in reality it's a garbage error pointer.
    
    Use IS_ERR() instead of a NULL check, and assign ret appropriately.
    
    Reported-by: syzbot+221cc24572a2fed23b6b@syzkaller.appspotmail.com
    Fixes: 561fb04a ("io_uring: replace workqueue usage with io-wq")
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    975c99a5
io_uring.c 104 KB