diff options
| author | Pavel Emelyanov <xemul@openvz.org> | 2009-02-26 14:35:13 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-05-02 21:56:30 +0400 |
| commit | b0bc360ef22df5239c4de5d1bb45d795bbcb5db3 (patch) | |
| tree | ca5c31cec0da806bcd224c07afeb64d5a77ba5be | |
| parent | 47a520e8e3f15e8d8ad4103b7a4ae615d8ca5512 (diff) | |
| download | linux-b0bc360ef22df5239c4de5d1bb45d795bbcb5db3.tar.xz | |
ipv6: don't use tw net when accounting for recycled tw
[ Upstream commit 3f53a38131a4e7a053c0aa060aba0411242fb6b9 ]
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@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| -rw-r--r-- | net/ipv6/inet6_hashtables.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c index 1646a5658255..4494cb6aa62b 100644 --- a/net/ipv6/inet6_hashtables.c +++ b/net/ipv6/inet6_hashtables.c @@ -210,11 +210,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); } |
