Skip to content

Commit

Permalink
Merge branch 'dsa-headroom'
Browse files Browse the repository at this point in the history
Per Forlin says:

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

Sorry for re-posting yet another time....
I manage to include multiple email-senders and forgot to include cover-letter.
Let's hope everyhthing is in order this time.

Fix two tag drivers to make sure there is headroom for the tag data.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Feb 14, 2020
2 parents 5fdcce2 + ddc9aba commit 3ea89fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/dsa/tag_ar9331.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static struct sk_buff *ar9331_tag_xmit(struct sk_buff *skb,
__le16 *phdr;
u16 hdr;

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

phdr = skb_push(skb, AR9331_HDR_LEN);
Expand Down
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 3ea89fa

Please sign in to comment.