From: Patrick McHardy Date: Mon, 7 Aug 2006 05:22:47 +0000 (-0700) Subject: [IPV6]: Fix crash in ip6_del_rt X-Git-Tag: upstream/snapshot3+hdmi~38334^2~315 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c813a7297e3af4cd7c3458e09e9ee3d161c6830;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [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 Signed-off-by: David S. Miller --- diff --git a/net/ipv6/route.c b/net/ipv6/route.c index ff5affe..41c5905 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1223,6 +1223,9 @@ int ip6_del_rt(struct rt6_info *rt, struct nlmsghdr *nlh, void *_rtattr, struct int err; struct fib6_table *table; + if (rt == &ip6_null_entry) + return -ENOENT; + table = rt->rt6i_table; write_lock_bh(&table->tb6_lock);