From c7c2f54b7abb6c8f1b7daa05099d280e7abccba5 Mon Sep 17 00:00:00 2001 From: Hillf Danton Date: Wed, 1 Apr 2020 17:19:33 +0800 Subject: [PATCH 1310/2944] io_uring: add missing finish_wait() in io_sq_thread() to #28170604 commit 10bea96dcc13ad841d53bdcc9d8e731e9e0ad58f upstream Add it to pair with prepare_to_wait() in an attempt to avoid anything weird in the field. Fixes: b41e98524e42 ("io_uring: add per-task callback handler") Reported-by: syzbot+0c3370f235b74b3cfd97@syzkaller.appspotmail.com Signed-off-by: Hillf Danton Signed-off-by: Jens Axboe Acked-by: Joseph Qi Signed-off-by: Xiaoguang Wang --- fs/io_uring.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/io_uring.c b/fs/io_uring.c index 3ea4438..cbc6888 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -5967,6 +5967,7 @@ static int io_sq_thread(void *data) } if (current->task_works) { task_work_run(); + finish_wait(&ctx->sqo_wait, &wait); continue; } if (signal_pending(current)) -- 1.8.3.1