diff --git a/include/net/sock.h b/include/net/sock.h index 8ab05146a447c0648a00adc1f28d643dacb865e9..86a8ca177a29ef90f37560f153648e1cb1fe608f 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1197,7 +1197,8 @@ static inline struct dst_entry * __sk_dst_get(struct sock *sk) { return rcu_dereference_check(sk->sk_dst_cache, rcu_read_lock_held() || - sock_owned_by_user(sk)); + sock_owned_by_user(sk) || + lockdep_is_held(&sk->sk_lock.slock)); } static inline struct dst_entry *