Skip to content

Commit 04fb912

Browse files
Per Forlindavem330
authored andcommitted
net: dsa: tag_qca: Make sure there is headroom for tag
Passing tag size to skb_cow_head will make sure there is enough headroom for the tag data. This change does not introduce any overhead in case there is already available headroom for tag. Signed-off-by: Per Forlin <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5fdcce2 commit 04fb912

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/dsa/tag_qca.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
3333
struct dsa_port *dp = dsa_slave_to_port(dev);
3434
u16 *phdr, hdr;
3535

36-
if (skb_cow_head(skb, 0) < 0)
36+
if (skb_cow_head(skb, QCA_HDR_LEN) < 0)
3737
return NULL;
3838

3939
skb_push(skb, QCA_HDR_LEN);

0 commit comments

Comments
 (0)