[mmotm] build error fix of "fix a race condition of oops_in_progress"

Previous thread: 2.6.27-rc6 Bug in tty_chars_in_buffer by John Daiker on Sunday, September 14, 2008 - 7:26 pm. (1 message)

Next thread: 2.6.26.5-rt9 : irq.c:118: error: implicit declaration of function 'ftrace_event_irq' by Alexander Pazdnikov on Sunday, September 14, 2008 - 10:53 pm. (1 message)
From: KOSAKI Motohiro
Date: Sunday, September 14, 2008 - 10:45 pm

Hi Andrew,

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


=====================================
From: KOSAKI Motohiro <kosaki.motohiro@jp.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@jp.fujitsu.com>
CC: Huang Ying <ying.huang@intel.com>
CC: Andrew Morton <akpm@linux-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)) ...
Previous thread: 2.6.27-rc6 Bug in tty_chars_in_buffer by John Daiker on Sunday, September 14, 2008 - 7:26 pm. (1 message)

Next thread: 2.6.26.5-rt9 : irq.c:118: error: implicit declaration of function 'ftrace_event_irq' by Alexander Pazdnikov on Sunday, September 14, 2008 - 10:53 pm. (1 message)