From: Ingo Molnar Teach special (recursive) locking code to the lock validator. Has no effect on non-lockdep kernels. Signed-off-by: Ingo Molnar Signed-off-by: Arjan van de Ven Cc: "David S. Miller" Signed-off-by: Andrew Morton --- include/net/sock.h | 3 +++ net/ipv4/tcp_ipv4.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff -puN include/net/sock.h~lockdep-annotate-bh_lock_sock include/net/sock.h --- a/include/net/sock.h~lockdep-annotate-bh_lock_sock +++ a/include/net/sock.h @@ -750,6 +750,9 @@ extern void FASTCALL(release_sock(struct /* BH context may only use the following locking interface. */ #define bh_lock_sock(__sk) spin_lock(&((__sk)->sk_lock.slock)) +#define bh_lock_sock_nested(__sk) \ + spin_lock_nested(&((__sk)->sk_lock.slock), \ + SINGLE_DEPTH_NESTING) #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) extern struct sock *sk_alloc(int family, diff -puN net/ipv4/tcp_ipv4.c~lockdep-annotate-bh_lock_sock net/ipv4/tcp_ipv4.c --- a/net/ipv4/tcp_ipv4.c~lockdep-annotate-bh_lock_sock +++ a/net/ipv4/tcp_ipv4.c @@ -1089,7 +1089,7 @@ process: skb->dev = NULL; - bh_lock_sock(sk); + bh_lock_sock_nested(sk); ret = 0; if (!sock_owned_by_user(sk)) { #ifdef CONFIG_NET_DMA _