All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] net: macb: fix missing unlock on error in macb_start_xmit()
@ 2016-09-10 11:17 Wei Yongjun
  2016-09-12  7:38 ` Nicolas Ferre
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Wei Yongjun @ 2016-09-10 11:17 UTC (permalink / raw)
  To: Nicolas Ferre, Helmut Buchsbaum; +Cc: Wei Yongjun, netdev

From: Wei Yongjun <weiyongjun1@huawei.com>

Fix missing unlock before return from function macb_start_xmit()
in the error handling case.

Fixes: 007e4ba3ee13 ("net: macb: initialize checksum when using
checksum offloading")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/ethernet/cadence/macb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index 0294b6a..63144bb 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -1398,7 +1398,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	if (macb_clear_csum(skb)) {
 		dev_kfree_skb_any(skb);
-		return NETDEV_TX_OK;
+		goto unlock;
 	}
 
 	/* Map socket buffer for DMA transfer */

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

* Re: [PATCH -next] net: macb: fix missing unlock on error in macb_start_xmit()
  2016-09-10 11:17 [PATCH -next] net: macb: fix missing unlock on error in macb_start_xmit() Wei Yongjun
@ 2016-09-12  7:38 ` Nicolas Ferre
  2016-09-12 17:40 ` Helmut Buchsbaum
  2016-09-13 15:42 ` David Miller
  2 siblings, 0 replies; 5+ messages in thread
From: Nicolas Ferre @ 2016-09-12  7:38 UTC (permalink / raw)
  To: Wei Yongjun, Helmut Buchsbaum; +Cc: Wei Yongjun, netdev

Le 10/09/2016 à 13:17, Wei Yongjun a écrit :
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Fix missing unlock before return from function macb_start_xmit()
> in the error handling case.
> 
> Fixes: 007e4ba3ee13 ("net: macb: initialize checksum when using
> checksum offloading")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Yes,
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Thanks. Best regards,

> ---
>  drivers/net/ethernet/cadence/macb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index 0294b6a..63144bb 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -1398,7 +1398,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
>  
>  	if (macb_clear_csum(skb)) {
>  		dev_kfree_skb_any(skb);
> -		return NETDEV_TX_OK;
> +		goto unlock;
>  	}
>  
>  	/* Map socket buffer for DMA transfer */
> 
> 


-- 
Nicolas Ferre

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

* Re: [PATCH -next] net: macb: fix missing unlock on error in macb_start_xmit()
  2016-09-10 11:17 [PATCH -next] net: macb: fix missing unlock on error in macb_start_xmit() Wei Yongjun
  2016-09-12  7:38 ` Nicolas Ferre
@ 2016-09-12 17:40 ` Helmut Buchsbaum
  2016-09-29 17:21   ` Nicolas Ferre
  2016-09-13 15:42 ` David Miller
  2 siblings, 1 reply; 5+ messages in thread
From: Helmut Buchsbaum @ 2016-09-12 17:40 UTC (permalink / raw)
  To: Wei Yongjun, Nicolas Ferre; +Cc: netdev

On 09/10/2016 01:17 PM, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Fix missing unlock before return from function macb_start_xmit()
> in the error handling case.
>
> Fixes: 007e4ba3ee13 ("net: macb: initialize checksum when using
> checksum offloading")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/net/ethernet/cadence/macb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index 0294b6a..63144bb 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -1398,7 +1398,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
>
>  	if (macb_clear_csum(skb)) {
>  		dev_kfree_skb_any(skb);
> -		return NETDEV_TX_OK;
> +		goto unlock;
>  	}
>
>  	/* Map socket buffer for DMA transfer */
>
You are definitely right. Sorry I missed that obvious point and for 
causing any inconveniences.

BTW, I see there are obviously quite a few users of MACB 
implementations. I'm just curious if anybody else ever encountered the 
checksum problem or if this a matter of Zynq implementation only.

Regards,
Helmut

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

* Re: [PATCH -next] net: macb: fix missing unlock on error in macb_start_xmit()
  2016-09-10 11:17 [PATCH -next] net: macb: fix missing unlock on error in macb_start_xmit() Wei Yongjun
  2016-09-12  7:38 ` Nicolas Ferre
  2016-09-12 17:40 ` Helmut Buchsbaum
@ 2016-09-13 15:42 ` David Miller
  2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2016-09-13 15:42 UTC (permalink / raw)
  To: weiyj.lk; +Cc: nicolas.ferre, helmut.buchsbaum, weiyongjun1, netdev

From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Sat, 10 Sep 2016 11:17:57 +0000

> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Fix missing unlock before return from function macb_start_xmit()
> in the error handling case.
> 
> Fixes: 007e4ba3ee13 ("net: macb: initialize checksum when using
> checksum offloading")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied.

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

* Re: [PATCH -next] net: macb: fix missing unlock on error in macb_start_xmit()
  2016-09-12 17:40 ` Helmut Buchsbaum
@ 2016-09-29 17:21   ` Nicolas Ferre
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Ferre @ 2016-09-29 17:21 UTC (permalink / raw)
  To: Helmut Buchsbaum, Wei Yongjun; +Cc: netdev, Cyrille Pitchen

Le 12/09/2016 à 19:40, Helmut Buchsbaum a écrit :
> On 09/10/2016 01:17 PM, Wei Yongjun wrote:
>> From: Wei Yongjun <weiyongjun1@huawei.com>
>>
>> Fix missing unlock before return from function macb_start_xmit()
>> in the error handling case.
>>
>> Fixes: 007e4ba3ee13 ("net: macb: initialize checksum when using
>> checksum offloading")
>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>> ---
>>  drivers/net/ethernet/cadence/macb.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
>> index 0294b6a..63144bb 100644
>> --- a/drivers/net/ethernet/cadence/macb.c
>> +++ b/drivers/net/ethernet/cadence/macb.c
>> @@ -1398,7 +1398,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
>>
>>  	if (macb_clear_csum(skb)) {
>>  		dev_kfree_skb_any(skb);
>> -		return NETDEV_TX_OK;
>> +		goto unlock;
>>  	}
>>
>>  	/* Map socket buffer for DMA transfer */
>>
> You are definitely right. Sorry I missed that obvious point and for 
> causing any inconveniences.
> 
> BTW, I see there are obviously quite a few users of MACB 
> implementations. I'm just curious if anybody else ever encountered the 
> checksum problem or if this a matter of Zynq implementation only.

I've just verified that we are affected by this issue as well on sama5d2
(Microchip / Atmel cortex-A5 MPUs).

Thanks for the fix,
-- 
Nicolas Ferre

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

end of thread, other threads:[~2016-09-29 17:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-10 11:17 [PATCH -next] net: macb: fix missing unlock on error in macb_start_xmit() Wei Yongjun
2016-09-12  7:38 ` Nicolas Ferre
2016-09-12 17:40 ` Helmut Buchsbaum
2016-09-29 17:21   ` Nicolas Ferre
2016-09-13 15:42 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.