diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-12-06 20:33:47 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 08:39:25 -0800 |
commit | 48ad504ee7d598431cb2d0b2f01c6d1aff1d2a07 (patch) | |
tree | 52862e12cdca605b04959fc0fa28164dc015013b /security/keys/keyring.c | |
parent | 7cf9c2c76c1a17b32f2da85b50cd4fe468ed44b5 (diff) | |
download | talos-op-linux-48ad504ee7d598431cb2d0b2f01c6d1aff1d2a07.tar.gz talos-op-linux-48ad504ee7d598431cb2d0b2f01c6d1aff1d2a07.zip |
[PATCH] security/keys/*: user kmemdup()
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'security/keys/keyring.c')
-rw-r--r-- | security/keys/keyring.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/security/keys/keyring.c b/security/keys/keyring.c index e8d02acc51e7..ad45ce73964b 100644 --- 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; - 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; |