Skip to content

Commit ddc9aba

Browse files
Per Forlindavem330
authored andcommitted
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 <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 04fb912 commit ddc9aba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/dsa/tag_ar9331.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static struct sk_buff *ar9331_tag_xmit(struct sk_buff *skb,
3131
__le16 *phdr;
3232
u16 hdr;
3333

34-
if (skb_cow_head(skb, 0) < 0)
34+
if (skb_cow_head(skb, AR9331_HDR_LEN) < 0)
3535
return NULL;
3636

3737
phdr = skb_push(skb, AR9331_HDR_LEN);

0 commit comments

Comments
 (0)