From 231b7e37887b1be03dcfaffea72356827dd8a102 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 3 Jul 2006 00:25:13 -0700 Subject: [PATCH] --- yaml --- r: 31826 b: refs/heads/master c: c63661848581a9842dfc72d9a400285dd284fc47 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/sock.h | 3 +++ trunk/net/ipv4/tcp_ipv4.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0258576fd392..0b638db62d13 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a09785a2414afb261d9f719d544742af4300df22 +refs/heads/master: c63661848581a9842dfc72d9a400285dd284fc47 diff --git a/trunk/include/net/sock.h b/trunk/include/net/sock.h index 83805feea880..0969fb60d6ea 100644 --- a/trunk/include/net/sock.h +++ b/trunk/include/net/sock.h @@ -751,6 +751,9 @@ extern void FASTCALL(release_sock(struct sock *sk)); /* 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 --git a/trunk/net/ipv4/tcp_ipv4.c b/trunk/net/ipv4/tcp_ipv4.c index 823717285c6d..5a886e6efbbe 100644 --- a/trunk/net/ipv4/tcp_ipv4.c +++ b/trunk/net/ipv4/tcp_ipv4.c @@ -1090,7 +1090,7 @@ int tcp_v4_rcv(struct sk_buff *skb) skb->dev = NULL; - bh_lock_sock(sk); + bh_lock_sock_nested(sk); ret = 0; if (!sock_owned_by_user(sk)) { #ifdef CONFIG_NET_DMA