diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-09-22 06:57:21 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-09-22 06:57:21 -0400 |
commit | d389424e00f9097cd24b3df4ca0ab7221f140eeb (patch) | |
tree | 9ffa95a4e791b19e5d793a06943e40221858b236 /net/llc/llc_sap.c | |
parent | 2928c19e1086e2f1e90d05931437ab6f1e4cfdc8 (diff) |
[LLC]: Fix the accept path
Borrowing the structure of TCP/IP for this. On the receive of new connections I
was bh_lock_socking the _new_ sock, not the listening one, duh, now it survives
the ssh connections storm I've been using to test this specific bug.
Also fixes send side skb sock accounting.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/llc/llc_sap.c')
-rw-r--r-- | net/llc/llc_sap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c index 9f064b3a4335..e6d538937f93 100644 --- a/net/llc/llc_sap.c +++ b/net/llc/llc_sap.c | |||
@@ -31,7 +31,7 @@ | |||
31 | * Allocates an sk_buff for frame and initializes sk_buff fields. | 31 | * Allocates an sk_buff for frame and initializes sk_buff fields. |
32 | * Returns allocated skb or %NULL when out of memory. | 32 | * Returns allocated skb or %NULL when out of memory. |
33 | */ | 33 | */ |
34 | struct sk_buff *llc_alloc_frame(struct net_device *dev) | 34 | struct sk_buff *llc_alloc_frame(struct sock *sk, struct net_device *dev) |
35 | { | 35 | { |
36 | struct sk_buff *skb = alloc_skb(128, GFP_ATOMIC); | 36 | struct sk_buff *skb = alloc_skb(128, GFP_ATOMIC); |
37 | 37 | ||
@@ -41,6 +41,8 @@ struct sk_buff *llc_alloc_frame(struct net_device *dev) | |||
41 | skb->protocol = htons(ETH_P_802_2); | 41 | skb->protocol = htons(ETH_P_802_2); |
42 | skb->dev = dev; | 42 | skb->dev = dev; |
43 | skb->mac.raw = skb->head; | 43 | skb->mac.raw = skb->head; |
44 | if (sk != NULL) | ||
45 | skb_set_owner_w(skb, sk); | ||
44 | } | 46 | } |
45 | return skb; | 47 | return skb; |
46 | } | 48 | } |