Commit:     32f0c4cbe495d121c09ed14d9c84f9e1b9574415
Parent:     0a8891a0a419d43ea06c8ded0849f0820c6a873b
Author:     Pavel Emelyanov <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 9 13:02:17 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:54:59 2007 -0700

    [NETNS]: Don't memset() netns to zero manually
    The newly created net namespace is set to 0 with memset()
    in setup_net(). The setup_net() is also called for the
    init_net_ns(), which is zeroed naturally as a global var.
    So remove this memset and allocate new nets with the
    Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/core/net_namespace.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 0e0ca6d..6f71db8 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -24,7 +24,7 @@ EXPORT_SYMBOL_GPL(init_net);
 static struct net *net_alloc(void)
-       return kmem_cache_alloc(net_cachep, GFP_KERNEL);
+       return kmem_cache_zalloc(net_cachep, GFP_KERNEL);
 static void net_free(struct net *net)
@@ -90,7 +90,6 @@ static int setup_net(struct net *net)
        struct pernet_operations *ops;
        int error;
-       memset(net, 0, sizeof(struct net));
        atomic_set(&net->count, 1);
        atomic_set(&net->use_count, 0);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to