From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: runningdoglackey@yahoo.com, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: Problems with /proc/net/tcp6 - possible bug - ipv6
Date: Mon, 24 Jan 2011 14:40:25 -0800 (PST) [thread overview]
Message-ID: <20110124.144025.189712500.davem@davemloft.net> (raw)
In-Reply-To: <1295732444.2651.68.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 22 Jan 2011 22:40:44 +0100
> In my testings, I even have crashes in cleanup_once() if I
> enable /proc/sys/net/ipv4/tcp_tw_recycle
Luckily, this bug was easy to fix, I've just committed the
following to net-2.6
The other crash (the !RTF_CACHE WARN assertion) I'm looking
into now.
--------------------
>From 1c5642cf754939c318a0230b0f546a9e20888292 Mon Sep 17 00:00:00 2001
From: David S. Miller <davem@davemloft.net>
Date: Mon, 24 Jan 2011 14:37:46 -0800
Subject: [PATCH] inetpeer: Use correct AVL tree base pointer in inet_getpeer().
Family was hard-coded to AF_INET but should be daddr->family.
This fixes crashes when unlinking ipv6 peer entries, since the
unlink code was looking up the base pointer properly.
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/ipv4/inetpeer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index d9bc857..a96e656 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -475,7 +475,7 @@ static int cleanup_once(unsigned long ttl)
struct inet_peer *inet_getpeer(struct inetpeer_addr *daddr, int create)
{
struct inet_peer __rcu **stack[PEER_MAXDEPTH], ***stackptr;
- struct inet_peer_base *base = family_to_base(AF_INET);
+ struct inet_peer_base *base = family_to_base(daddr->family);
struct inet_peer *p;
/* Look up for the address quickly, lockless.
--
1.7.3.4
next prev parent reply other threads:[~2011-01-24 22:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <702550.61465.qm@web63902.mail.re1.yahoo.com>
2011-01-22 8:59 ` Problems with /proc/net/tcp6 - possible bug - ipv6 Eric Dumazet
2011-01-22 15:15 ` Eric Dumazet
2011-01-22 19:42 ` PK
2011-01-22 21:20 ` Eric Dumazet
2011-01-22 21:40 ` Eric Dumazet
2011-01-24 22:31 ` David Miller
2011-01-24 22:40 ` David Miller [this message]
2011-01-25 0:02 ` David Miller
2011-01-24 22:42 ` David Miller
2011-01-31 22:51 PK
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=20110124.144025.189712500.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=runningdoglackey@yahoo.com \
/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;
as well as URLs for NNTP newsgroup(s).