{
        struct dev_exception_item *ex, *tmp, *new;
 
+       lockdep_assert_held(&devcgroup_mutex);
+
        list_for_each_entry(ex, orig, list) {
                new = kmemdup(ex, sizeof(*ex), GFP_KERNEL);
                if (!new)
 {
        struct dev_exception_item *excopy, *walk;
 
+       lockdep_assert_held(&devcgroup_mutex);
+
        excopy = kmemdup(ex, sizeof(*ex), GFP_KERNEL);
        if (!excopy)
                return -ENOMEM;
 {
        struct dev_exception_item *walk, *tmp;
 
+       lockdep_assert_held(&devcgroup_mutex);
+
        list_for_each_entry_safe(walk, tmp, &dev_cgroup->exceptions, list) {
                if (walk->type != ex->type)
                        continue;
 {
        struct dev_exception_item *ex, *tmp;
 
+       lockdep_assert_held(&devcgroup_mutex);
+
        list_for_each_entry_safe(ex, tmp, &dev_cgroup->exceptions, list) {
                list_del_rcu(&ex->list);
                kfree_rcu(ex, rcu);
        struct dev_exception_item *ex;
        bool match = false;
 
+       rcu_lockdep_assert(rcu_read_lock_held() ||
+                          lockdep_is_held(&devcgroup_mutex),
+                          "device_cgroup::may_access() called without proper synchronization");
+
        list_for_each_entry_rcu(ex, &dev_cgroup->exceptions, list) {
                if ((refex->type & DEV_BLOCK) && !(ex->type & DEV_BLOCK))
                        continue;