Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41734
b: refs/heads/master
c: 58a5a7b
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and David S. Miller committed Dec 3, 2006
1 parent 836122c commit 1477910
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e523a1550e877f8a8ff87a50269b7ee7bfb43464
refs/heads/master: 58a5a7b9555ea231b557ebef5cabeaf8e951df0b
2 changes: 1 addition & 1 deletion trunk/drivers/net/pppoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ static int pppoe_rcv(struct sk_buff *skb,

po = get_item((unsigned long) ph->sid, eth_hdr(skb)->h_source);
if (po != NULL)
return sk_receive_skb(sk_pppox(po), skb);
return sk_receive_skb(sk_pppox(po), skb, 0);
drop:
kfree_skb(skb);
out:
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,8 @@ static inline void sock_put(struct sock *sk)
sk_free(sk);
}

extern int sk_receive_skb(struct sock *sk, struct sk_buff *skb);
extern int sk_receive_skb(struct sock *sk, struct sk_buff *skb,
const int nested);

/* Detach socket from process context.
* Announce socket dead, detach it from wait queue and inode.
Expand Down
7 changes: 5 additions & 2 deletions trunk/net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
}
EXPORT_SYMBOL(sock_queue_rcv_skb);

int sk_receive_skb(struct sock *sk, struct sk_buff *skb)
int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
{
int rc = NET_RX_SUCCESS;

Expand All @@ -279,7 +279,10 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb)

skb->dev = NULL;

bh_lock_sock(sk);
if (nested)
bh_lock_sock_nested(sk);
else
bh_lock_sock(sk);
if (!sock_owned_by_user(sk)) {
/*
* trylock + unlock semantics:
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/dccp/ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ static int dccp_v4_rcv(struct sk_buff *skb)
goto discard_and_relse;
nf_reset(skb);

return sk_receive_skb(sk, skb);
return sk_receive_skb(sk, skb, 1);

no_dccp_socket:
if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb))
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/dccp/ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ static int dccp_v6_rcv(struct sk_buff **pskb)
if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb))
goto discard_and_relse;

return sk_receive_skb(sk, skb) ? -1 : 0;
return sk_receive_skb(sk, skb, 1) ? -1 : 0;

no_dccp_socket:
if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb))
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/decnet/dn_nsp_in.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ static int dn_nsp_rx_packet(struct sk_buff *skb)
goto free_out;
}

return sk_receive_skb(sk, skb);
return sk_receive_skb(sk, skb, 0);
}

return dn_nsp_no_socket(skb, reason);
Expand Down

0 comments on commit 1477910

Please sign in to comment.