Skip to content
Commit 8a14e46f authored by David Ahern's avatar David Ahern Committed by David S. Miller
Browse files

net/ipv6: Fix missing rcu dereferences on from

kbuild test robot reported 2 uses of rt->from not properly accessed
using rcu_dereference:
1. add rcu_dereference_protected to rt6_remove_exception_rt and make
   sure it is always called with rcu lock held.

2. change rt6_do_redirect to take a reference on 'from' when accessed
   the first time so it can be used the sceond time outside of the lock

Fixes: a68886a6

 ("net/ipv6: Make from in rt6_info rcu protected")
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3c14da0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment