Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190318
b: refs/heads/master
c: 03449cd
h: refs/heads/master
v: v3
  • Loading branch information
David Howells authored and Linus Torvalds committed Apr 27, 2010
1 parent 216f21b commit 8b89920
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a2cb9aeb3c9b2475955cec328487484034f414e4
refs/heads/master: 03449cd9eaa4fa3a7faa4a59474bafe2e90bd143
9 changes: 8 additions & 1 deletion trunk/security/keys/request_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,10 @@ static int construct_alloc_key(struct key_type *type,

key_already_present:
mutex_unlock(&key_construction_mutex);
if (dest_keyring)
if (dest_keyring) {
__key_link(dest_keyring, key_ref_to_ptr(key_ref));
up_write(&dest_keyring->sem);
}
mutex_unlock(&user->cons_lock);
key_put(key);
*_key = key = key_ref_to_ptr(key_ref);
Expand Down Expand Up @@ -431,6 +433,11 @@ struct key *request_key_and_link(struct key_type *type,

if (!IS_ERR(key_ref)) {
key = key_ref_to_ptr(key_ref);
if (dest_keyring) {
construct_get_dest_keyring(&dest_keyring);
key_link(dest_keyring, key);
key_put(dest_keyring);
}
} else if (PTR_ERR(key_ref) != -EAGAIN) {
key = ERR_CAST(key_ref);
} else {
Expand Down

0 comments on commit 8b89920

Please sign in to comment.