mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[PATCH] kernel/nsproxy.c: use kmemdup()
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
3e2a532b26
commit
e05d722e45
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue