mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 17:41:22 +00:00
net: dsa: tag_ar9331: 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 <perfn@axis.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
04fb91243a
commit
ddc9abaf5d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user