* [PATCH] ipv6: Fix dst_release of invalid pointer
@ 2010-01-27 7:08 Krishna Kumar
2010-01-27 7:11 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Krishna Kumar @ 2010-01-27 7:08 UTC (permalink / raw)
To: davem; +Cc: netdev, Krishna Kumar
Fix dst_release on a invalid region.
Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
---
net/ipv6/addrconf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -ruNp org/net/ipv6/addrconf.c new/net/ipv6/addrconf.c
--- org/net/ipv6/addrconf.c 2010-01-27 10:03:28.000000000 +0530
+++ new/net/ipv6/addrconf.c 2010-01-27 10:04:00.000000000 +0530
@@ -823,7 +823,8 @@ static void ipv6_del_addr(struct inet6_i
rt->rt6i_flags |= RTF_EXPIRES;
}
}
- dst_release(&rt->u.dst);
+ if (rt)
+ dst_release(&rt->u.dst);
}
in6_ifa_put(ifp);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ipv6: Fix dst_release of invalid pointer
2010-01-27 7:08 [PATCH] ipv6: Fix dst_release of invalid pointer Krishna Kumar
@ 2010-01-27 7:11 ` David Miller
2010-01-27 7:59 ` Krishna Kumar2
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2010-01-27 7:11 UTC (permalink / raw)
To: krkumar2; +Cc: netdev
From: Krishna Kumar <krkumar2@in.ibm.com>
Date: Wed, 27 Jan 2010 12:38:02 +0530
> Fix dst_release on a invalid region.
>
> Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
NULL, is NULL, is NULL, and always will be NULL.
Even if rt == NULL, &rt->u.dst will be NULL too.
So it's just plain NULL.
You NULL that? :-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ipv6: Fix dst_release of invalid pointer
2010-01-27 7:11 ` David Miller
@ 2010-01-27 7:59 ` Krishna Kumar2
0 siblings, 0 replies; 3+ messages in thread
From: Krishna Kumar2 @ 2010-01-27 7:59 UTC (permalink / raw)
To: David Miller; +Cc: netdev
David Miller <davem@davemloft.net> wrote on 01/27/2010 12:41:33 PM:
> From: Krishna Kumar <krkumar2@in.ibm.com>
> Date: Wed, 27 Jan 2010 12:38:02 +0530
>
> > Fix dst_release on a invalid region.
> >
> > Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
>
> NULL, is NULL, is NULL, and always will be NULL.
>
> Even if rt == NULL, &rt->u.dst will be NULL too.
>
> So it's just plain NULL.
>
> You NULL that? :-)
Yes :)
I forgot dst_entry was the first element in rt6_info.
thanks,
- KK
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-27 7:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-27 7:08 [PATCH] ipv6: Fix dst_release of invalid pointer Krishna Kumar
2010-01-27 7:11 ` David Miller
2010-01-27 7:59 ` Krishna Kumar2
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox