[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200702044946.33142-1-qiang.zhang@windriver.com>
Date: Thu, 2 Jul 2020 12:49:46 +0800
From: <qiang.zhang@...driver.com>
To: <ben.dooks@...ethink.co.uk>, <bfields@...hat.com>,
<cl@...k-chips.com>, <peterz@...radead.org>, <pmladek@...e.com>,
<tj@...nel.org>
CC: <linux-kernel@...r.kernel.org>
Subject: [PATCH] kthread: work could not be queued when worker being destroyed
From: Zhang Qiang <qiang.zhang@...driver.com>
The queuing_blocked func should returns true when the worker
being destroyed.
Signed-off-by: Zhang Qiang <qiang.zhang@...driver.com>
---
kernel/kthread.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/kthread.c b/kernel/kthread.c
index 1166f2043e67..2ca711d0e78a 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -791,7 +791,7 @@ static inline bool queuing_blocked(struct kthread_worker *worker,
{
lockdep_assert_held(&worker->lock);
- return !list_empty(&work->node) || work->canceling;
+ return !list_empty(&work->node) || work->canceling || !worker->task;
}
static void kthread_insert_work_sanity_check(struct kthread_worker *worker,
--
2.24.1
Powered by blists - more mailing lists