Skip to contentSkip to conversation

io_uring: fix missing wake_up io_rw_reissue()

PATCH Applied Pavel Begunkov 2 participants 2 messages Jun 29, 2020

Subsystems (2)
lore
Share & tools
lore
maintainer Applied
#1 lore raw
In reply to Pavel Begunkov
Quoted 2 lines · Pavel Begunkov

Don't forget to wake up a process to which io_rw_reissue() added task_work.

Applied, thanks.

Signature · 1 line
Jens Axboe
#0 lore raw

PATCH v2 1/1 io_uring: fix missing wake_up io_rw_reissue()

Don't forget to wake up a process to which io_rw_reissue() added task_work.

---

v2: wake on success path not fail (Jens)

 fs/io_uring.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fs/io_uring.c +3 -1
index 3bbadc3247b4..6710097564de 100644
@@ -2168,8 +2168,10 @@ static bool io_rw_reissue(struct io_kiocb *req, long res)
 	tsk = req->task;
 	init_task_work(&req->task_work, io_rw_resubmit);
 	ret = task_work_add(tsk, &req->task_work, true);
-	if (!ret)
+	if (!ret) {
+		wake_up_process(tsk);
 		return true;
+	}
 #endif
 	return false;
 }
Signature · 1 line
2.24.0