diff options
author | James Morris <jmorris@namei.org> | 2012-01-09 12:16:48 +1100 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2012-01-09 12:16:48 +1100 |
commit | 8fcc99549522fc7a0bbaeb5755855ab0d9a59ce8 (patch) | |
tree | a118eaef15d4ba22247f45ee01537ecc906cd161 /security/keys | |
parent | 805a6af8dba5dfdd35ec35dc52ec0122400b2610 (diff) | |
parent | 7b7e5916aa2f46e57f8bd8cb89c34620ebfda5da (diff) | |
download | talos-op-linux-8fcc99549522fc7a0bbaeb5755855ab0d9a59ce8.tar.gz talos-op-linux-8fcc99549522fc7a0bbaeb5755855ab0d9a59ce8.zip |
Merge branch 'next' into for-linus
Conflicts:
security/integrity/evm/evm_crypto.c
Resolved upstream fix vs. next conflict manually.
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/keys')
-rw-r--r-- | security/keys/key.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/security/keys/key.c b/security/keys/key.c index 4414abddcb5b..4f64c7267afb 100644 --- a/security/keys/key.c +++ b/security/keys/key.c @@ -291,6 +291,7 @@ struct key *key_alloc(struct key_type *type, const char *desc, atomic_set(&key->usage, 1); init_rwsem(&key->sem); + lockdep_set_class(&key->sem, &type->lock_class); key->type = type; key->user = user; key->quotalen = quotalen; @@ -946,6 +947,8 @@ int register_key_type(struct key_type *ktype) struct key_type *p; int ret; + memset(&ktype->lock_class, 0, sizeof(ktype->lock_class)); + ret = -EEXIST; down_write(&key_types_sem); |