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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 12 Dec 2006 20:11:17 +0000
From:	David Howells <dhowells@...hat.com>
To:	torvalds@...l.org, akpm@...l.org, davem@...emloft.com,
	matthew@....cx
Cc:	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
	dhowells@...hat.com
Subject: [PATCH 2/2] WorkStruct: Use bitops-safe direct assignment

Replace the direct assignment in set_wq_data() with a bitops-proofed wrapper
(assign_bits()).  This defends against the test_and_set_bit() used to mark a
work item active.

Signed-Off-By: David Howells <dhowells@...hat.com>
---

 kernel/workqueue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index db49886..f5e9540 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -97,7 +97,7 @@ static inline void set_wq_data(struct wo
 
 	new = (unsigned long) wq | (1UL << WORK_STRUCT_PENDING);
 	new |= work->management & WORK_STRUCT_FLAG_MASK;
-	work->management = new;
+	assign_bits(new, &work->management);
 }
 
 static inline void *get_wq_data(struct work_struct *work)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ