From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Cristian Rodríguez" <crrodriguez@opensuse.org>
Cc: netdev@vger.kernel.org, Gao feng <gaofeng@cn.fujitsu.com>
Subject: Re: ipv6: BUG: unable to handle kernel paging request at 0000000101bca2be
Date: Sat, 28 Jul 2012 21:21:27 +0200 [thread overview]
Message-ID: <1343503287.2626.13180.camel@edumazet-glaptop> (raw)
In-Reply-To: <1343502509.2626.13172.camel@edumazet-glaptop>
On Sat, 2012-07-28 at 21:08 +0200, Eric Dumazet wrote:
> This looks like an error coming from commit
> 1716a96101c49186bb0b8491922fd3e69030235f
> (ipv6: fix problem with expired dst cache)
>
> dst_release() is called with a bogus dst pointer : 0000000101bca23e
>
> rt6_clean_expires() seems to be called where it shouldnt.
>
> Could you try reverting it ?
>
Or try following patch instead :
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 0ae759a..a85a865 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -123,13 +123,18 @@ static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst)
return ((struct rt6_info *)dst)->rt6i_idev;
}
+static inline void __rt6_clean_expires(struct rt6_info *rt)
+{
+ rt->rt6i_flags &= ~RTF_EXPIRES;
+ rt->dst.from = NULL;
+}
+
static inline void rt6_clean_expires(struct rt6_info *rt)
{
if (!(rt->rt6i_flags & RTF_EXPIRES) && rt->dst.from)
dst_release(rt->dst.from);
- rt->rt6i_flags &= ~RTF_EXPIRES;
- rt->dst.from = NULL;
+ __rt6_clean_expires(rt);
}
static inline void rt6_set_expires(struct rt6_info *rt, unsigned long expires)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index becb048..965f315 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -969,7 +969,7 @@ struct dst_entry *ip6_blackhole_route(struct net *net, struct dst_entry *dst_ori
rt->rt6i_gateway = ort->rt6i_gateway;
rt->rt6i_flags = ort->rt6i_flags;
- rt6_clean_expires(rt);
+ __rt6_clean_expires(rt);
rt->rt6i_metric = 0;
memcpy(&rt->rt6i_dst, &ort->rt6i_dst, sizeof(struct rt6key));
@@ -1305,7 +1305,7 @@ int ip6_route_add(struct fib6_config *cfg)
rt6_set_expires(rt, jiffies +
clock_t_to_jiffies(cfg->fc_expires));
else
- rt6_clean_expires(rt);
+ __rt6_clean_expires(rt);
if (cfg->fc_protocol == RTPROT_UNSPEC)
cfg->fc_protocol = RTPROT_BOOT;
@@ -1837,7 +1837,7 @@ static struct rt6_info *ip6_rt_copy(struct rt6_info *ort,
(RTF_DEFAULT | RTF_ADDRCONF))
rt6_set_from(rt, ort);
else
- rt6_clean_expires(rt);
+ __rt6_clean_expires(rt);
rt->rt6i_metric = 0;
#ifdef CONFIG_IPV6_SUBTREES
prev parent reply other threads:[~2012-07-28 19:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-28 17:08 ipv6: BUG: unable to handle kernel paging request at 0000000101bca2be Cristian Rodríguez
2012-07-28 19:08 ` Eric Dumazet
2012-07-28 19:21 ` Eric Dumazet [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=1343503287.2626.13180.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=crrodriguez@opensuse.org \
--cc=gaofeng@cn.fujitsu.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