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>] [day] [month] [year] [list]
Date:   Mon, 6 Nov 2017 12:08:02 -0800
From:   Tejun Heo <tj@...nel.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     linux-kernel@...r.kernel.org, Li Bin <huawei.libin@...wei.com>
Subject: [GIT PULL] workqueue fix for v4.14-rc8

Hello, Linus.

Another fix for a really old bug.  It only affects drain_workqueue()
which isn't used often and even then triggers only during a pretty
small race window, so it isn't too surprising that it stayed hidden
for so long.  The fix is straight-forward and low-risk.  Kudos to Li
Bin for reporting and fixing the bug.

Thanks.

The following changes since commit 692b48258dda7c302e777d7d5f4217244478f1f6:

  workqueue: replace pool->manager_arb mutex with a flag (2017-10-10 07:13:57 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-4.14-fixes

for you to fetch changes up to cef572ad9bd7f85035ba8272e5352040e8be0152:

  workqueue: Fix NULL pointer dereference (2017-10-30 07:56:01 -0700)

----------------------------------------------------------------
Li Bin (1):
      workqueue: Fix NULL pointer dereference

 kernel/workqueue_internal.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/workqueue_internal.h b/kernel/workqueue_internal.h
index 8635417..29fa81f 100644
--- a/kernel/workqueue_internal.h
+++ b/kernel/workqueue_internal.h
@@ -9,6 +9,7 @@
 
 #include <linux/workqueue.h>
 #include <linux/kthread.h>
+#include <linux/preempt.h>
 
 struct worker_pool;
 
@@ -59,7 +60,7 @@ struct worker {
  */
 static inline struct worker *current_wq_worker(void)
 {
-	if (current->flags & PF_WQ_WORKER)
+	if (in_task() && (current->flags & PF_WQ_WORKER))
 		return kthread_data(current);
 	return NULL;
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ