Commit 5e91f6ce authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

sock: relax WARN_ON() in sock_owned_by_user()

Valdis reported tons of stack dumps caused by WARN_ON() in

This test needs to be relaxed if/when lockdep disables itself.

Note that other lockdep_sock_is_held() callers are all from
rcu_dereference_protected() sections which already are disabled
if/when lockdep has been disabled.

Fixes: fafc4e1e ("sock: tigthen lockdep checks for sock_owned_by_user")
Reported-by: default avatarValdis Kletnieks <>
Signed-off-by: default avatarEric Dumazet <>
Acked-by: default avatarHannes Frederic Sowa <>
Signed-off-by: default avatarDavid S. Miller <>
parent 15cfd407
......@@ -1409,7 +1409,7 @@ static inline void unlock_sock_fast(struct sock *sk, bool slow)
static inline bool sock_owned_by_user(const struct sock *sk)
WARN_ON_ONCE(!lockdep_sock_is_held(sk) && debug_locks);
return sk->sk_lock.owned;
Markdown is supported
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