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, 15 Sep 2008 14:45:27 +0900
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	kosaki.motohiro@...fujitsu.com, Huang Ying <ying.huang@...el.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: [mmotm] build error fix of "fix a race condition of oops_in_progress"

Hi Andrew,

I love CONFIG_DEBUG_MUTEXES.
Could you please pick up following patch?


=====================================
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>

Patch against: mmotm 09/13
Patch name: fix-a-race-condtion-of-oops_in_progress-fix2.patch
Applied after: fix-a-race-condtion-of-oops_in_progress-fix.patch


if CONFIG_DEBUG_MUTEXES=y, mutex.c makes following build error.
because oops_in_progress was changed from int to atomic_t.

------------------------------------------------------------------
  CC      kernel/mutex.o
kernel/mutex.c: In function '__mutex_lock_common':
kernel/mutex.c:135: error: wrong type argument to unary exclamation mark
kernel/mutex.c:135: error: wrong type argument to unary exclamation mark
kernel/mutex.c:183: error: wrong type argument to unary exclamation mark
kernel/mutex.c:183: error: wrong type argument to unary exclamation mark
kernel/mutex.c: In function '__mutex_unlock_common_slowpath':
kernel/mutex.c:240: error: wrong type argument to unary exclamation mark
kernel/mutex.c:240: error: wrong type argument to unary exclamation mark
kernel/mutex.c: In function '__mutex_trylock_slowpath':
kernel/mutex.c:351: error: wrong type argument to unary exclamation mark
kernel/mutex.c:351: error: wrong type argument to unary exclamation mark
make[1]: *** [kernel/mutex.o] Error 1
make: *** [kernel] Error 2
---------------------------------------------------------------


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
CC: Huang Ying <ying.huang@...el.com>
CC: Andrew Morton <akpm@...ux-foundation.org>

---
 include/linux/debug_locks.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/include/linux/debug_locks.h
===================================================================
--- a/include/linux/debug_locks.h
+++ b/include/linux/debug_locks.h
@@ -17,7 +17,7 @@ extern int debug_locks_off(void);
 ({									\
 	int __ret = 0;							\
 									\
-	if (!oops_in_progress && unlikely(c)) {				\
+	if (!atomic_read(&oops_in_progress) && unlikely(c)) {		\
 		if (debug_locks_off() && !debug_locks_silent)		\
 			WARN_ON(1);					\
 		__ret = 1;						\


--
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