• Jens Axboe's avatar
    io-wq: ensure all pending work is canceled on exit · f0127254
    Jens Axboe authored
    If we race on shutting down the io-wq, then we should ensure that any
    work that was queued after workers shutdown is canceled. Harden the
    add work check a bit too, checking for IO_WQ_BIT_EXIT and cancel if
    it's set.
    
    Add a WARN_ON() for having any work before we kill the io-wq context.
    
    Reported-by: syzbot+91b4b56ead187d35c9d3@syzkaller.appspotmail.com
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    f0127254
io-wq.c 27.3 KB