* [PATCH] IPV6: fix an oops in rt6_device_match()
@ 2004-09-11 11:10 YOSHIFUJI Hideaki / 吉藤英明
2004-09-12 23:32 ` David S. Miller
0 siblings, 1 reply; 3+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-09-11 11:10 UTC (permalink / raw)
To: davem; +Cc: netdev, yoshfuji
Hello.
This fixes panic in rt6_device_match().
Well, rt->rt6i_idev is always set if it is dynamically allocated.
However, when we hit ip6_null_entry here, its rt6i_idev is NULL.
This patch is minimum fix to avoid the oops for now.
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
===== net/ipv6/route.c 1.89 vs edited =====
--- 1.89/net/ipv6/route.c 2004-08-25 03:20:43 +09:00
+++ edited/net/ipv6/route.c 2004-09-11 19:31:24 +09:00
@@ -184,7 +184,8 @@
if (dev->ifindex == oif)
return sprt;
if (dev->flags & IFF_LOOPBACK) {
- if (sprt->rt6i_idev->dev->ifindex != oif) {
+ if (sprt->rt6i_idev == NULL ||
+ sprt->rt6i_idev->dev->ifindex != oif) {
if (strict && oif)
continue;
if (local && (!oif ||
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] IPV6: fix an oops in rt6_device_match()
2004-09-11 11:10 [PATCH] IPV6: fix an oops in rt6_device_match() YOSHIFUJI Hideaki / 吉藤英明
@ 2004-09-12 23:32 ` David S. Miller
2004-09-13 0:49 ` YOSHIFUJI Hideaki / 吉藤英明
0 siblings, 1 reply; 3+ messages in thread
From: David S. Miller @ 2004-09-12 23:32 UTC (permalink / raw)
To: yoshfuji; +Cc: netdev
On Sat, 11 Sep 2004 20:10:29 +0900 (JST)
YOSHIFUJI Hideaki / ^[$B5HF#1QL@^[(B <yoshfuji@linux-ipv6.org> wrote:
> This fixes panic in rt6_device_match().
>
> Well, rt->rt6i_idev is always set if it is dynamically allocated.
> However, when we hit ip6_null_entry here, its rt6i_idev is NULL.
> This patch is minimum fix to avoid the oops for now.
>
> Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Ok, as long as we fix this more cleanly eventually.
Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] IPV6: fix an oops in rt6_device_match()
2004-09-12 23:32 ` David S. Miller
@ 2004-09-13 0:49 ` YOSHIFUJI Hideaki / 吉藤英明
0 siblings, 0 replies; 3+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-09-13 0:49 UTC (permalink / raw)
To: davem; +Cc: netdev, yoshfuji
In article <20040912163216.7f49673a.davem@davemloft.net> (at Sun, 12 Sep 2004 16:32:16 -0700), "David S. Miller" <davem@davemloft.net> says:
> > Well, rt->rt6i_idev is always set if it is dynamically allocated.
> > However, when we hit ip6_null_entry here, its rt6i_idev is NULL.
> > This patch is minimum fix to avoid the oops for now.
> >
> > Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
>
> Ok, as long as we fix this more cleanly eventually.
Thanks.
I'll revisit when we introduce more users (per-interface stats.).
--yoshfuji
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-09-13 0:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-11 11:10 [PATCH] IPV6: fix an oops in rt6_device_match() YOSHIFUJI Hideaki / 吉藤英明
2004-09-12 23:32 ` David S. Miller
2004-09-13 0:49 ` YOSHIFUJI Hideaki / 吉藤英明
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).