From: David Miller <davem@davemloft.net>
To: cebbert@redhat.com
Cc: netdev@vger.kernel.org
Subject: Re: oops / null deref in __inet6_check_established(), kernel 2.6.29-rc6
Date: Tue, 03 Mar 2009 14:21:02 -0800 (PST) [thread overview]
Message-ID: <20090303.142102.134459736.davem@davemloft.net> (raw)
In-Reply-To: <20090224183554.330eb308@dhcp-100-2-144.bos.redhat.com>
From: Chuck Ebbert <cebbert@redhat.com>
Date: Tue, 24 Feb 2009 18:35:54 -0500
> On Tue, 24 Feb 2009 15:27:04 -0800 (PST)
> David Miller <davem@davemloft.net> wrote:
>
> > From: Chuck Ebbert <cebbert@redhat.com>
> > Date: Tue, 24 Feb 2009 18:21:47 -0500
> >
> > > (This doesn't happen on 2.6.27/28)
> > >
> > > tw is NULL at net/ipv6/inet6_hashtables.c:261:
> > >
> > > if (twp != NULL) {
> > > *twp = tw;
> > > ===> NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITRECYCLED);
> > > } else if (tw != NULL) {
> > >
> > > I can reproduce this on real hardware on x86_64 too...
> >
> > How? :-)
>
> Oops, forgot to add the bug URL:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=486889
>
> Steps to Reproduce:
> 1. Get minirpc 0.3.2 [http://minirpc.cs.cmu.edu/download/minirpc-0.3.2.tar.gz]
> 2. Run ./configure ; make ; make check
Should be fixed by:
commit 3f53a38131a4e7a053c0aa060aba0411242fb6b9
Author: Pavel Emelyanov <xemul@openvz.org>
Date: Thu Feb 26 03:35:13 2009 -0800
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@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
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);
}
prev parent reply other threads:[~2009-03-03 22:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-24 23:21 oops / null deref in __inet6_check_established(), kernel 2.6.29-rc6 Chuck Ebbert
2009-02-24 23:27 ` David Miller
2009-02-24 23:35 ` Chuck Ebbert
2009-02-28 3:16 ` Kyle McMartin
2009-03-02 5:09 ` Kyle McMartin
2009-03-02 5:28 ` David Miller
2009-03-02 5:33 ` David Miller
2009-03-02 17:18 ` Kyle McMartin
2009-03-03 22:21 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090303.142102.134459736.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=cebbert@redhat.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox