Skip to contentSkip to conversation

ipv6: Fix dst_release of invalid pointer

PATCH In review Krishna Kumar 2 participants 3 messages Jan 27, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipv6: Fix dst_release of invalid pointer

Fix dst_release on a invalid region.

---
 net/ipv6/addrconf.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/ipv6/addrconf.c +2 -1
diff -ruNp org/net/ipv6/addrconf.c new/net/ipv6/addrconf.c
@@ -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);
maintainer
#1 lore raw

From: Krishna Kumar <[email protected]>
Date: Wed, 27 Jan 2010 12:38:02 +0530

Quoted 3 lines

Fix dst_release on a invalid region.

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? :-)

#2 lore raw

David Miller <[email protected]> wrote on 01/27/2010 12:41:33 PM:

Quoted 7 lines

From: Krishna Kumar <[email protected]>
Date: Wed, 27 Jan 2010 12:38:02 +0530

Quoted 3 lines

Fix dst_release on a invalid region.

Quoted 7 lines

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