security: Apply lockdep-based checking to rcu_dereference() uses
[pandora-kernel.git] / security / keys / gc.c
index 4770be3..1990231 100644 (file)
@@ -77,7 +77,8 @@ static bool key_gc_keyring(struct key *keyring, time_t limit)
                goto dont_gc;
 
        /* scan the keyring looking for dead keys */
-       klist = rcu_dereference(keyring->payload.subscriptions);
+       klist = rcu_dereference_check(keyring->payload.subscriptions,
+                                     lockdep_is_held(&key_serial_lock));
        if (!klist)
                goto dont_gc;