Skip to content

Commit

Permalink
security/device_cgroup: Fix RCU_LOCKDEP_WARN() condition
Browse files Browse the repository at this point in the history
f78f5b9 ("rcu: Rename rcu_lockdep_assert() to RCU_LOCKDEP_WARN()")
introduced a bug by incorrectly inverting the condition when moving from
rcu_lockdep_assert() to RCU_LOCKDEP_WARN().  This commit therefore fixes
the inversion.

Reported-by: Felipe Balbi <[email protected]>
Reported-by: Tejun Heo <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Tested-by: Josh Boyer <[email protected]>
  • Loading branch information
paulmck committed Sep 4, 2015
1 parent 12d560f commit dc3a04d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/device_cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ static bool verify_new_ex(struct dev_cgroup *dev_cgroup,
bool match = false;

RCU_LOCKDEP_WARN(!rcu_read_lock_held() &&
lockdep_is_held(&devcgroup_mutex),
!lockdep_is_held(&devcgroup_mutex),
"device_cgroup:verify_new_ex called without proper synchronization");

if (dev_cgroup->behavior == DEVCG_DEFAULT_ALLOW) {
Expand Down

0 comments on commit dc3a04d

Please sign in to comment.