27 lines
746 B
Diff
27 lines
746 B
Diff
From: Pavel Emelyanov <xemul@openvz.org>
|
|
Date: Wed, 22 Apr 2009 15:05:03 +0000 (+0400)
|
|
Subject: net: avoid double free on net->gen pointer on error
|
|
X-Git-Url: http://git.openvz.org/?p=linux-2.6.27-openvz;a=commitdiff_plain;h=4f908925f495ea1e2f401b8fcf3cdc91c5968429
|
|
|
|
net: avoid double free on net->gen pointer on error
|
|
|
|
If we failed with netns creation net->gen will be kfree-ed twice.
|
|
|
|
http://bugzilla.openvz.org/show_bug.cgi?id=1241
|
|
|
|
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
|
|
---
|
|
|
|
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
|
|
index 523eba0..64b0a40 100644
|
|
--- a/net/core/net_namespace.c
|
|
+++ b/net/core/net_namespace.c
|
|
@@ -75,6 +75,7 @@ out_undo:
|
|
}
|
|
|
|
rcu_barrier();
|
|
+ net->gen = NULL;
|
|
kfree(ng);
|
|
goto out;
|
|
}
|