Thread (3 messages) flat view 3 messages, 3 authors, 2017-10-24

Re: [PATCH net-next] ipv6: add ip6_null_entry check in rt6_select()

From: Martin KaFai Lau <hidden>
Date: 2017-10-23 22:27:28

On Mon, Oct 23, 2017 at 09:59:35PM +0000, Wei Wang wrote:
From: Wei Wang <redacted>

In rt6_select(), fn->leaf could be pointing to net->ipv6.ip6_null_entry.
In this case, we should directly return instead of trying to carry on
with the rest of the process.
If not, we could crash at:
  spin_lock_bh(&leaf->rt6i_table->rt6_lock);
because net->ipv6.ip6_null_entry does not have rt6i_table set.
Make sense. leaf->rt6i_table->rt6_lock is only needed after the rcu work.

Thanks for fixing it!

Acked-by: Martin KaFai Lau <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help