kthread: work could not be queued when worker being destroyed
PATCH v2 1/1 kthread: work could not be queued when worker being destroyed
From: Zhang Qiang <[email protected]>
The "queuing_blocked" func should print warning message and returns true when the worker being destroyed.
---
v1->v2:
Add warning information for condition "!worker->task"
kernel/kthread.c | 3 +++ 1 file changed, 3 insertions(+)
kernel/kthread.c +3 -0
@@ -791,6 +791,9 @@ static inline bool queuing_blocked(struct kthread_worker *worker, {lockdep_assert_held (&worker->lock); +if (WARN_ON (!worker->task)) +return true; +return !list_empty (&work->node) || work->canceling; }
Signature · 1 line
2.24.1
Quoted 7 lines · On Thu 2020-07-02 15:01:56, [email protected] wrote:
From: Zhang Qiang <[email protected]>
The "
queuing_blocked" func should print warning message and returns true when the worker being destroyed.Suggested-by Petr Mladek <[email protected]>Signed-off-by Zhang Qiang <[email protected]>
Looks good to me.
Adding Andrew into CC. Changes in kernel/kthread.c usually goes through him. You might need to resend the patch once again with Andrew in CC.
Best Regards,
Petr Mladek
Quoted 4 lines · On Thu, 2 Jul 2020 15:01:56 +0800 <[email protected]> wrote:
From: Zhang Qiang <[email protected]>
The "
queuing_blocked" func should print warning message and returns true when the worker being destroyed.
Why should it do this?
Please prepare a changelog which contains much more information.