]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/nsproxy.c
[PATCH] slab debug and ARCH_SLAB_MINALIGN don't get along
[linux-2.6-omap-h63xx.git] / kernel / nsproxy.c
index 6ebdb82a0ce43a5211e3862008959cb5091febcd..674aceb7335ad56f7a2a8ba2996d0faa4ed850db 100644 (file)
@@ -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;
 }