lkml.org 
[lkml]   [2022]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] workqueue: missing NOT while checking if Workqueue is offline
Greetings,

This is a one-character patch but very important as the kernel workqueue
__cancel_work_timer will cancel active work without the NOT operator
added.

During early boot wq_online is false so with the NOT added it will evaluate
to true. Conversely, after boot is done, workqueue is now true and we want
it to evaluate to false because otherwise it will cancel important work.

Signed-off-by: Geraldo Nascimento <geraldogabriel@gmail.com>

--- workqueue.c 2022-05-28 16:54:12.024176123 -0300
+++ workqueue.c 2022-05-28 16:54:37.698176135 -0300
@@ -3158,7 +3158,7 @@ static bool __cancel_work_timer(struct w
* This allows canceling during early boot. We know that @work
* isn't executing.
*/
- if (wq_online)
+ if (!wq_online)
__flush_work(work, true);

clear_work_data(work);
\
 
 \ /
  Last update: 2022-05-28 22:09    [W:0.515 / U:1.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site