Skip to content
Commit f0127254 authored by Jens Axboe's avatar Jens Axboe
Browse files

io-wq: ensure all pending work is canceled on exit



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: default avatar <syzbot+91b4b56ead187d35c9d3@syzkaller.appspotmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent e4b4a13f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment