Skip to content

Commit

Permalink
net: dsa: tag_qca: Make sure there is headroom for tag
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Per Forlin authored and davem330 committed Feb 14, 2020
1 parent 5fdcce2 commit 04fb912
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dsa/tag_qca.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
struct dsa_port *dp = dsa_slave_to_port(dev);
u16 *phdr, hdr;

if (skb_cow_head(skb, 0) < 0)
if (skb_cow_head(skb, QCA_HDR_LEN) < 0)
return NULL;

skb_push(skb, QCA_HDR_LEN);
Expand Down

0 comments on commit 04fb912

Please sign in to comment.