Unverified Commit c961654d authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!14367 io_uring: check if iowq is killed before queuing

parents 9bdc4e59 b8039a45
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -498,7 +498,11 @@ void io_queue_iowq(struct io_kiocb *req, struct io_tw_state *ts_dont_use)
	struct io_uring_task *tctx = req->task->io_uring;

	BUG_ON(!tctx);
	BUG_ON(!tctx->io_wq);

	if ((current->flags & PF_KTHREAD) || !tctx->io_wq) {
		io_req_task_queue_fail(req, -ECANCELED);
		return;
	}

	/* init ->work of the whole link before punting */
	io_prep_async_link(req);