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]
Message-ID: <49a21941.0a04d00a.5f94.1245@mx.google.com>
Date:	Mon, 23 Feb 2009 04:31:22 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] rt: fix a build error on locking-selftest.c

Fix a build error while rt mutexes selftests:

lib/locking-selftest.c: In function ‘dotest’:
lib/locking-selftest.c:951: erreur: incompatible types in initialization
lib/locking-selftest.c:1003: erreur: incompatible types in assignment

lock_count is of type atomic_t.

Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
---
 lib/locking-selftest.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c
index 0732078..9520632 100644
--- a/lib/locking-selftest.c
+++ b/lib/locking-selftest.c
@@ -948,7 +948,7 @@ static void dotest(void (*testcase_fn)(void), int expected, int lockclass_mask)
 	unsigned long saved_preempt_count = preempt_count();
 	int expected_failure = 0;
 #if defined(CONFIG_DEBUG_PREEMPT) && defined(CONFIG_DEBUG_RT_MUTEXES)
-        int saved_lock_count = current->lock_count;
+        int saved_lock_count = atomic_read(&current->lock_count);
 #endif
 
 	WARN_ON(irqs_disabled());
@@ -1000,7 +1000,7 @@ static void dotest(void (*testcase_fn)(void), int expected, int lockclass_mask)
 
 	reset_locks();
 #if defined(CONFIG_DEBUG_PREEMPT) && defined(CONFIG_DEBUG_RT_MUTEXES)
-        current->lock_count = saved_lock_count;
+        atomic_set(&current->lock_count, saved_lock_count);
 #endif
 }
 
-- 
1.6.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