Skip to contentSkip to conversation

net: dsa: input correct header length for skb_cow_head()

PATCH In review xiaofeis 2 participants 3 messages Mar 16, 2020

Subsystems (5)
lore
Share & tools
lore

xiaofeis

author
#0 lore raw

PATCH 1/1 net: dsa: input correct header length for skb_cow_head()

We need to ensure there is enough headroom to push QCA header, so input the QCA header length instead of 0.

---
 net/dsa/tag_qca.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/dsa/tag_qca.c +1 -1
index c958852..72c1629 100644
@@ -36,7 +36,7 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
 	dev->stats.tx_packets++;
 	dev->stats.tx_bytes += skb->len;
 
-	if (skb_cow_head(skb, 0) < 0)
+	if (skb_cow_head(skb, QCA_HDR_LEN) < 0)
 		return NULL;
 
 	skb_push(skb, QCA_HDR_LEN);
Signature · 1 line
2.7.4
maintainer
#1 lore raw

From: xiaofeis <[email protected]>
Date: Mon, 16 Mar 2020 09:04:05 +0800

Quoted 4 lines

We need to ensure there is enough headroom to push QCA header, so input the QCA header length instead of 0.

This was already fixed by:

commit 04fb91243a853dbde216d829c79d9632e52aa8d9

Author: Per Forlin <[email protected]>
Date:   Thu Feb 13 15:37:09 2020 +0100

net: dsa: tag_qca: Make sure there is headroom for tag

#2 lore raw
Quoted 8 lines · 在 2020-03-16 17:07,David Miller 写道:

From: xiaofeis <[email protected]>
Date: Mon, 16 Mar 2020 09:04:05 +0800

Quoted 4 lines

We need to ensure there is enough headroom to push QCA header, so input the QCA header length instead of 0.

Quoted 7 lines

This was already fixed by:

commit 04fb91243a853dbde216d829c79d9632e52aa8d9

Author: Per Forlin <[email protected]>
Date:   Thu Feb 13 15:37:09 2020 +0100

net: dsa: tag_qca: Make sure there is headroom for tag

Ok, got it.