aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-09-15 16:26:57 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-09-15 16:26:57 -0700
commit1e484d388773b0a984236a181fb21e133630df42 (patch)
tree89486a9206abce3e35b40892f3f14a040a7c92e3 /security
parentMerge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux (diff)
parentdevice_cgroup: Fix RCU list debugging warning (diff)
downloadlinux-dev-1e484d388773b0a984236a181fb21e133630df42.tar.xz
linux-dev-1e484d388773b0a984236a181fb21e133630df42.zip
Merge tag 'fixes-v5.9a' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security layer fix from James Morris: "A device_cgroup RCU warning fix from Amol Grover" * tag 'fixes-v5.9a' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: device_cgroup: Fix RCU list debugging warning
Diffstat (limited to 'security')
-rw-r--r--security/device_cgroup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 43ab0ad45c1b..04375df52fc9 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -354,7 +354,8 @@ static bool match_exception_partial(struct list_head *exceptions, short type,
{
struct dev_exception_item *ex;
- list_for_each_entry_rcu(ex, exceptions, list) {
+ list_for_each_entry_rcu(ex, exceptions, list,
+ lockdep_is_held(&devcgroup_mutex)) {
if ((type & DEVCG_DEV_BLOCK) && !(ex->type & DEVCG_DEV_BLOCK))
continue;
if ((type & DEVCG_DEV_CHAR) && !(ex->type & DEVCG_DEV_CHAR))