netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: dsa: Make sure there is headroom for tag
@ 2020-02-13 14:37 Per Forlin
  2020-02-13 14:37 ` [PATCH net 1/2] net: dsa: tag_qca: " Per Forlin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Per Forlin @ 2020-02-13 14:37 UTC (permalink / raw)
  To: netdev, andrew, o.rempel, davem; +Cc: Per Forlin

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.

Per Forlin (2):
  net: dsa: tag_qca: Make sure there is headroom for tag
  net: dsa: tag_ar9331: Make sure there is headroom for tag

 net/dsa/tag_ar9331.c | 2 +-
 net/dsa/tag_qca.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH net 1/2] net: dsa: tag_qca: Make sure there is headroom for tag
  2020-02-13 14:37 [PATCH net 0/2] net: dsa: Make sure there is headroom for tag Per Forlin
@ 2020-02-13 14:37 ` Per Forlin
  2020-02-13 20:02   ` Florian Fainelli
  2020-02-13 14:37 ` [PATCH net 2/2] net: dsa: tag_ar9331: " Per Forlin
  2020-02-14 15:35 ` [PATCH net 0/2] net: dsa: " David Miller
  2 siblings, 1 reply; 7+ messages in thread
From: Per Forlin @ 2020-02-13 14:37 UTC (permalink / raw)
  To: netdev, andrew, o.rempel, davem; +Cc: Per Forlin, Per Forlin

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>
---
 net/dsa/tag_qca.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH net 2/2] net: dsa: tag_ar9331: Make sure there is headroom for tag
  2020-02-13 14:37 [PATCH net 0/2] net: dsa: Make sure there is headroom for tag Per Forlin
  2020-02-13 14:37 ` [PATCH net 1/2] net: dsa: tag_qca: " Per Forlin
@ 2020-02-13 14:37 ` Per Forlin
  2020-02-13 20:02   ` Florian Fainelli
  2020-02-14 15:35 ` [PATCH net 0/2] net: dsa: " David Miller
  2 siblings, 1 reply; 7+ messages in thread
From: Per Forlin @ 2020-02-13 14:37 UTC (permalink / raw)
  To: netdev, andrew, o.rempel, davem; +Cc: Per Forlin, Per Forlin

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>
---
 net/dsa/tag_ar9331.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/dsa/tag_ar9331.c b/net/dsa/tag_ar9331.c
index 466ffa92a474..55b00694cdba 100644
--- a/net/dsa/tag_ar9331.c
+++ b/net/dsa/tag_ar9331.c
@@ -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);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net 1/2] net: dsa: tag_qca: Make sure there is headroom for tag
  2020-02-13 14:37 ` [PATCH net 1/2] net: dsa: tag_qca: " Per Forlin
@ 2020-02-13 20:02   ` Florian Fainelli
  0 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2020-02-13 20:02 UTC (permalink / raw)
  To: Per Forlin, netdev, andrew, o.rempel, davem; +Cc: Per Forlin

On 2/13/20 6:37 AM, Per Forlin wrote:
> 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>
Fixes: cafdc45c949b ("net-next: dsa: add Qualcomm tag RX/TX handler")
-- 
Florian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net 2/2] net: dsa: tag_ar9331: Make sure there is headroom for tag
  2020-02-13 14:37 ` [PATCH net 2/2] net: dsa: tag_ar9331: " Per Forlin
@ 2020-02-13 20:02   ` Florian Fainelli
  0 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2020-02-13 20:02 UTC (permalink / raw)
  To: Per Forlin, netdev, andrew, o.rempel, davem; +Cc: Per Forlin

On 2/13/20 6:37 AM, Per Forlin wrote:
> 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>
Fixes: 48fda74f0a93 ("net: dsa: add support for Atheros AR9331 TAG format")
-- 
Florian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net 0/2] net: dsa: Make sure there is headroom for tag
  2020-02-13 14:37 [PATCH net 0/2] net: dsa: Make sure there is headroom for tag Per Forlin
  2020-02-13 14:37 ` [PATCH net 1/2] net: dsa: tag_qca: " Per Forlin
  2020-02-13 14:37 ` [PATCH net 2/2] net: dsa: tag_ar9331: " Per Forlin
@ 2020-02-14 15:35 ` David Miller
  2 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2020-02-14 15:35 UTC (permalink / raw)
  To: per.forlin; +Cc: netdev, andrew, o.rempel

From: Per Forlin <per.forlin@axis.com>
Date: Thu, 13 Feb 2020 15:37:08 +0100

> 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.

Series applied and queued up for -stable.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH net 0/2] net: dsa: Make sure there is headroom for tag
@ 2020-02-13 13:50 Per, Forlin <per.forlin
  0 siblings, 0 replies; 7+ messages in thread
From: Per, Forlin <per.forlin @ 2020-02-13 13:50 UTC (permalink / raw)
  To: netdev, andrew, o.rempel, davem; +Cc: Per Forlin

From: Per Forlin <per.forlin@axis.com>

Re-posting patches with a cover letter.
I forgot to include a cover-letter in the first round.

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

Per Forlin (2):
  net: dsa: tag_qca: Make sure there is headroom for tag
  net: dsa: tag_ar9331: Make sure there is headroom for tag

 net/dsa/tag_ar9331.c | 2 +-
 net/dsa/tag_qca.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-02-14 15:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 14:37 [PATCH net 0/2] net: dsa: Make sure there is headroom for tag Per Forlin
2020-02-13 14:37 ` [PATCH net 1/2] net: dsa: tag_qca: " Per Forlin
2020-02-13 20:02   ` Florian Fainelli
2020-02-13 14:37 ` [PATCH net 2/2] net: dsa: tag_ar9331: " Per Forlin
2020-02-13 20:02   ` Florian Fainelli
2020-02-14 15:35 ` [PATCH net 0/2] net: dsa: " David Miller
  -- strict thread matches above, loose matches on Subject: below --
2020-02-13 13:50 Per, Forlin <per.forlin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).