Subject: [IPV6]: Fix crash in ip6_del_rt

From: Patrick McHardy <[email-masked]>
Date: Mon, 07 Aug 2006 07:19:05 +0200

[IPV6]: Fix crash in ip6_del_rt

ip6_null_entry doesn't have rt6i_table set, when trying to delete it the
kernel crashes dereferencing table->tb6_lock.

Signed-off-by: Patrick McHardy <[email-masked]>

---
commit d3ddd45b230e8b56873c77d266004fec49c44f8b
tree 764a548789cd495e2b424824c682734f62e9cb94
parent 10365c03ef65f5bccc992d6b78f7ef037cb4f0e9
author Patrick McHardy <[email-masked]> Mon, 07 Aug 2006 06:54:47 +0200
committer Patrick McHardy <[email-masked]> Mon, 07 Aug 2006 06:54:47 +0200

 net/ipv6/route.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index d5c39c4..c6c3cf3 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1223,6 +1223,9 @@ int ip6_del_rt(struct rt6_info *rt, stru
 	int err;
 	struct fib6_table *table;
 
+	if (rt == &ip6_null_entry)
+		return -ENOENT;
+
 	table = rt->rt6i_table;
 	write_lock_bh(&table->tb6_lock);