LinuxKPI: lockdep_assert: wrong 'cond' used in WARN_ON MACRO
'cond' in WARN_ON need be bracketed, otherwise it is wrong for multiple conditions. Reviewed by: wulf MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44604
This commit is contained in:
committed by
Vladimir Kondratyev
parent
f042e15154
commit
21f4cf5ccf
@@ -50,8 +50,8 @@ struct pin_cookie {
|
||||
#define lockdep_unregister_key(key) do { } while(0)
|
||||
|
||||
#ifdef INVARIANTS
|
||||
#define lockdep_assert(cond) do { WARN_ON(!cond); } while (0)
|
||||
#define lockdep_assert_once(cond) do { WARN_ON_ONCE(!cond); } while (0)
|
||||
#define lockdep_assert(cond) do { WARN_ON(!(cond)); } while (0)
|
||||
#define lockdep_assert_once(cond) do { WARN_ON_ONCE(!(cond)); } while (0)
|
||||
|
||||
#define lockdep_assert_not_held(m) do { \
|
||||
struct lock_object *__lock = (struct lock_object *)(m); \
|
||||
|
||||
Reference in New Issue
Block a user