lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 28 May 2022 17:07:00 -0300
From:   Geraldo Nascimento <geraldogabriel@...il.com>
To:     Tejun Heo <tj@...nel.org>
Cc:     Lai Jiangshan <jiangshanlai@...il.com>,
        LKML <linux-kernel@...r.kernel.org>
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@...il.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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ