Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc3a04d5 authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

security/device_cgroup: Fix RCU_LOCKDEP_WARN() condition



f78f5b90 ("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: default avatarFelipe Balbi <balbi@ti.com>
Reported-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: default avatarSerge Hallyn <serge.hallyn@canonical.com>
Tested-by: default avatarJosh Boyer <jwboyer@fedoraproject.org>
parent 12d560f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {