提交 6c813a72 编写于 作者: P Patrick McHardy 提交者: David S. Miller

[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: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d7aba67f
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册