From b24be8674546e508075ba6a7b9e31def471a0ecf Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Thu, 19 Oct 2006 23:29:12 -0700 Subject: [PATCH] --- yaml --- r: 40021 b: refs/heads/master c: e05d722e4555cd54677b4c8431d9e81fd047ef7a h: refs/heads/master i: 40019: 65448a15ea9c469242fc5681857af916cefe0a0a v: v3 --- [refs] | 2 +- trunk/kernel/nsproxy.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index efdc07a1bf1c..e25e12c797b9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3e2a532b26b491706bd8b5c7cfc8d767b43b8f36 +refs/heads/master: e05d722e4555cd54677b4c8431d9e81fd047ef7a diff --git a/trunk/kernel/nsproxy.c b/trunk/kernel/nsproxy.c index 6ebdb82a0ce4..674aceb7335a 100644 --- a/trunk/kernel/nsproxy.c +++ b/trunk/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; }