Skip to content

Commit dc3a04d

Browse files
committed
security/device_cgroup: Fix RCU_LOCKDEP_WARN() condition
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 <balbi@ti.com> Reported-by: Tejun Heo <tj@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Tested-by: Josh Boyer <jwboyer@fedoraproject.org>
1 parent 12d560f commit dc3a04d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎security/device_cgroup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ static bool verify_new_ex(struct dev_cgroup *dev_cgroup,
401401
bool match = false;
402402

403403
RCU_LOCKDEP_WARN(!rcu_read_lock_held() &&
404-
lockdep_is_held(&devcgroup_mutex),
404+
!lockdep_is_held(&devcgroup_mutex),
405405
"device_cgroup:verify_new_ex called without proper synchronization");
406406

407407
if (dev_cgroup->behavior == DEVCG_DEFAULT_ALLOW) {

0 commit comments

Comments
 (0)