git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
security
/
keys
/
keyring.c
diff --git
a/security/keys/keyring.c
b/security/keys/keyring.c
index
e8d02ac
..
ad45ce7
100644
(file)
--- a/
security/keys/keyring.c
+++ b/
security/keys/keyring.c
@@
-706,12
+706,10
@@
int __key_link(struct key *keyring, struct key *key)
BUG_ON(size > PAGE_SIZE);
ret = -ENOMEM;
BUG_ON(size > PAGE_SIZE);
ret = -ENOMEM;
- nklist = km
alloc(
size, GFP_KERNEL);
+ nklist = km
emdup(klist,
size, GFP_KERNEL);
if (!nklist)
goto error2;
if (!nklist)
goto error2;
- memcpy(nklist, klist, size);
-
/* replace matched key */
atomic_inc(&key->usage);
nklist->keys[loop] = key;
/* replace matched key */
atomic_inc(&key->usage);
nklist->keys[loop] = key;