• Jens Axboe's avatar
    io_uring: flush offloaded and delayed task_work on exit · dfbe5561
    Jens Axboe authored
    io_uring offloads task_work for cancelation purposes when the task is
    exiting. This is conceptually fine, but we should be nicer and actually
    wait for that work to complete before returning.
    
    Add an argument to io_fallback_tw() telling it to flush the deferred
    work when it's all queued up, and have it flush a ctx behind whenever
    the ctx changes.
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    dfbe5561
io_uring.c 119 KB