• J
    io_uring: hold 'ctx' reference around task_work queue + execute · 6d816e08
    Jens Axboe 提交于
    We're holding the request reference, but we need to go one higher
    to ensure that the ctx remains valid after the request has finished.
    If the ring is closed with pending task_work inflight, and the
    given io_kiocb finishes sync during issue, then we need a reference
    to the ring itself around the task_work execution cycle.
    
    Cc: stable@vger.kernel.org # v5.7+
    Reported-by: syzbot+9b260fc33297966f5a8e@syzkaller.appspotmail.com
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    6d816e08
io_uring.c 207.2 KB