projects
/
platform
/
upstream
/
kernel-adaptation-pc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e2a532
)
[PATCH] kernel/nsproxy.c: use kmemdup()
author
Alexey Dobriyan
<adobriyan@gmail.com>
Fri, 20 Oct 2006 06:29:12 +0000
(23:29 -0700)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Fri, 20 Oct 2006 17:26:44 +0000
(10:26 -0700)
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/nsproxy.c
patch
|
blob
|
history
diff --git
a/kernel/nsproxy.c
b/kernel/nsproxy.c
index
6ebdb82
..
674aceb
100644
(file)
--- a/
kernel/nsproxy.c
+++ b/
kernel/nsproxy.c
@@
-44,11
+44,9
@@
static inline struct nsproxy *clone_namespaces(struct nsproxy *orig)
{
struct nsproxy *ns;
- ns = kmalloc(sizeof(struct nsproxy), GFP_KERNEL);
- if (ns) {
- memcpy(ns, orig, sizeof(struct nsproxy));
+ ns = kmemdup(orig, sizeof(struct nsproxy), GFP_KERNEL);
+ if (ns)
atomic_set(&ns->count, 1);
- }
return ns;
}