You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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>
This commit is contained in:
+3
-1
@@ -31,7 +31,7 @@
|
||||
* Allocates an sk_buff for frame and initializes sk_buff fields.
|
||||
* Returns allocated skb or %NULL when out of memory.
|
||||
*/
|
||||
struct sk_buff *llc_alloc_frame(struct net_device *dev)
|
||||
struct sk_buff *llc_alloc_frame(struct sock *sk, struct net_device *dev)
|
||||
{
|
||||
struct sk_buff *skb = alloc_skb(128, GFP_ATOMIC);
|
||||
|
||||
@@ -41,6 +41,8 @@ struct sk_buff *llc_alloc_frame(struct net_device *dev)
|
||||
skb->protocol = htons(ETH_P_802_2);
|
||||
skb->dev = dev;
|
||||
skb->mac.raw = skb->head;
|
||||
if (sk != NULL)
|
||||
skb_set_owner_w(skb, sk);
|
||||
}
|
||||
return skb;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user