Message ID | 20200213135100.2963-2-per.forlin@axis.com |
---|---|
State | Changes Requested |
Delegated to: | David Miller |
Headers | show |
Series | net: dsa: Make sure there is headroom for tag | expand |
On Thu, Feb 13, 2020 at 02:50:59PM +0100, Per@axis.com wrote: > From: Per Forlin <per.forlin@axis.com> > > 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> Hi Per If these are for net, you need a Fixes: tag. Also, you should add the Reivewed-by: tags i gave for these patches. Andrew
> > This change does not introduce any overhead in case there > > is already available headroom for tag. > > > > Signed-off-by: Per Forlin <perfn@axis.com> > Hi Per > If these are for net, you need a Fixes: tag. > Also, you should add the Reivewed-by: tags i gave for these patches. Yes, I should add this too. I will post a new series after the weekend with the received Reviewed-by and Tested-by as well. BR Per
diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c index c8a128c9e5e0..70db7c909f74 100644 --- a/net/dsa/tag_qca.c +++ b/net/dsa/tag_qca.c @@ -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);