Merge tag 'fixes-v5.9a' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[sfrench/cifs-2.6.git] / security / device_cgroup.c
index 43ab0ad45c1b62b8cdd16b956e120dabccc78fee..04375df52fc9a1e89babfad36bfcaa69703fafb1 100644 (file)
@@ -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))