Skip to content
Commit 5869b8fa authored by Xin Long's avatar Xin Long Committed by David S. Miller
Browse files

net: use rcu_dereference_protected to fetch sk_dst_cache in sk_destruct



As Eric noticed, in .sk_destruct, sk->sk_dst_cache update is prevented, and
no barrier is needed for this. So change to use rcu_dereference_protected()
instead of rcu_dereference_check() to fetch sk_dst_cache in there.

v1->v2:
  - no change, repost after net-next is open.

Reported-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b6163f19
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