aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-11-16 11:06:06 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:23:51 -0500
commit58a5a7b9555ea231b557ebef5cabeaf8e951df0b (patch)
tree9dac36b3483e9667a967f79982c965abd707e03d /net/dccp
parente523a1550e877f8a8ff87a50269b7ee7bfb43464 (diff)
[NET]: Conditionally use bh_lock_sock_nested in sk_receive_skb
Spotted by Ian McDonald, tentatively fixed by Gerrit Renker: http://www.mail-archive.com/dccp%40vger.kernel.org/msg00599.html Rewritten not to unroll sk_receive_skb, in the common case, i.e. no lock debugging, its optimized away. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/ipv4.c2
-rw-r--r--net/dccp/ipv6.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index a20eb71d45db..7114befe7d50 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -899,7 +899,7 @@ static int dccp_v4_rcv(struct sk_buff *skb)
899 goto discard_and_relse; 899 goto discard_and_relse;
900 nf_reset(skb); 900 nf_reset(skb);
901 901
902 return sk_receive_skb(sk, skb); 902 return sk_receive_skb(sk, skb, 1);
903 903
904no_dccp_socket: 904no_dccp_socket:
905 if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) 905 if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb))
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 6eda430ae929..03bb8298250a 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -888,7 +888,7 @@ static int dccp_v6_rcv(struct sk_buff **pskb)
888 if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) 888 if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb))
889 goto discard_and_relse; 889 goto discard_and_relse;
890 890
891 return sk_receive_skb(sk, skb) ? -1 : 0; 891 return sk_receive_skb(sk, skb, 1) ? -1 : 0;
892 892
893no_dccp_socket: 893no_dccp_socket:
894 if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) 894 if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb))