Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42703
b: refs/heads/master
c: 48ad504
h: refs/heads/master
i:
  42701: 1d32731
  42699: f1af589
  42695: 8495ead
  42687: bd81a69
v: v3
  • Loading branch information
Eric Sesterhenn authored and Linus Torvalds committed Dec 7, 2006
1 parent 734f979 commit c8c6753
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 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: 7cf9c2c76c1a17b32f2da85b50cd4fe468ed44b5
refs/heads/master: 48ad504ee7d598431cb2d0b2f01c6d1aff1d2a07
4 changes: 1 addition & 3 deletions trunk/security/keys/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,9 @@ struct key *key_alloc(struct key_type *type, const char *desc,
goto no_memory_2;

if (desc) {
key->description = kmalloc(desclen, GFP_KERNEL);
key->description = kmemdup(desc, desclen, GFP_KERNEL);
if (!key->description)
goto no_memory_3;

memcpy(key->description, desc, desclen);
}

atomic_set(&key->usage, 1);
Expand Down
4 changes: 1 addition & 3 deletions trunk/security/keys/keyring.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,12 +706,10 @@ int __key_link(struct key *keyring, struct key *key)
BUG_ON(size > PAGE_SIZE);

ret = -ENOMEM;
nklist = kmalloc(size, GFP_KERNEL);
nklist = kmemdup(klist, size, GFP_KERNEL);
if (!nklist)
goto error2;

memcpy(nklist, klist, size);

/* replace matched key */
atomic_inc(&key->usage);
nklist->keys[loop] = key;
Expand Down

0 comments on commit c8c6753

Please sign in to comment.