rpms/kernel/devel ipv6-dont-use-tw-net-when-accounting-recycled-tw.patch, NONE, 1.1 kernel.spec, 1.1357, 1.1358

Kyle McMartin kyle at fedoraproject.org
Mon Mar 2 15:00:40 UTC 2009


Author: kyle

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31026

Modified Files:
	kernel.spec 
Added Files:
	ipv6-dont-use-tw-net-when-accounting-recycled-tw.patch 
Log Message:
* Mon Mar 02 2009 Kyle McMartin <kyle at redhat.com>
- fix oops in ipv6 when NET_NS is enabled.


ipv6-dont-use-tw-net-when-accounting-recycled-tw.patch:

--- NEW FILE ipv6-dont-use-tw-net-when-accounting-recycled-tw.patch ---
>From netdev-owner at vger.kernel.org Thu Feb 26 06:32:12 2009
Date:	Thu, 26 Feb 2009 14:31:55 +0300
From:	Pavel Emelyanov <xemul at openvz.org>
Subject: ipv6: don't use tw net when accounting for recycled tw

We already have a valid net in that place, but this is not just a
cleanup - the tw pointer can be NULL there sometimes, thus causing
an oops in NET_NS=y case.

The same place in ipv4 code already works correctly using existing 
net, rather than tw's one.

The bug exists since 2.6.27.

Signed-off-by: Pavel Emelyanov <xemul at openvz.org>

---

diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
index 8fe267f..1bcc343 100644
--- a/net/ipv6/inet6_hashtables.c
+++ b/net/ipv6/inet6_hashtables.c
@@ -258,11 +258,11 @@ unique:
 
 	if (twp != NULL) {
 		*twp = tw;
-		NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITRECYCLED);
+		NET_INC_STATS_BH(net, LINUX_MIB_TIMEWAITRECYCLED);
 	} else if (tw != NULL) {
 		/* Silly. Should hash-dance instead... */
 		inet_twsk_deschedule(tw, death_row);
-		NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITRECYCLED);
+		NET_INC_STATS_BH(net, LINUX_MIB_TIMEWAITRECYCLED);
 
 		inet_twsk_put(tw);
 	}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1357
retrieving revision 1.1358
diff -u -r1.1357 -r1.1358
--- kernel.spec	2 Mar 2009 06:13:20 -0000	1.1357
+++ kernel.spec	2 Mar 2009 15:00:09 -0000	1.1358
@@ -660,6 +660,8 @@
 Patch2200: linux-2.6-firewire-git-update.patch
 Patch2201: linux-2.6-firewire-git-pending.patch
 
+Patch2250: ipv6-dont-use-tw-net-when-accounting-recycled-tw.patch
+
 Patch2300: linux-2.6.28-sunrpc-ipv6-rpcbind.patch
 Patch2301: linux-2.6.28-lockd-svc-register.patch
 
@@ -1192,6 +1194,9 @@
 #ApplyPatch linux-2.6-firewire-git-pending.patch
 #fi
 
+# fix oops with CONFIG_NET_NS=y
+ApplyPatch ipv6-dont-use-tw-net-when-accounting-recycled-tw.patch
+
 # Fix NFS
 ApplyPatch linux-2.6.28-sunrpc-ipv6-rpcbind.patch
 
@@ -1790,6 +1795,9 @@
 # and build.
 
 %changelog
+* Mon Mar 02 2009 Kyle McMartin <kyle at redhat.com>
+- fix oops in ipv6 when NET_NS is enabled.
+
 * Mon Mar 02 2009 Ben Skeggs <bskeggs at redhat.com>
 - nouveau fixes for recent drm-next changes, and various kms issues
 




More information about the fedora-extras-commits mailing list