Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-10 Thread Finn Thain
On Sun, 10 May 2020, Markus Elfring wrote: > Christophe Jaillet proposed to complete the exception handling also for this > function implementation. > I find that such a software correction is qualified for this tag. >

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-09 Thread Markus Elfring
> Is there a way to add a Fixes tag that would not invoke the -stable > process? And was that what you had in mind? Christophe Jaillet proposed to complete the exception handling also for this function implementation. I find that such a software correction is qualified for this tag.

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-09 Thread Finn Thain
On Fri, 8 May 2020, Jakub Kicinski wrote: > On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: > > @@ -527,8 +531,9 @@ static int mac_sonic_platform_remove(struct > > platform_device *pdev) > > struct sonic_local* lp = netdev_priv(dev); > > > > unregister_netdev(dev); > > -

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-09 Thread Finn Thain
On Sat, 9 May 2020, Markus Elfring wrote: > > While at it, rename a label in order to be slightly more informative and > > split some too long lines. > > Would you like to add the tag 'Fixes' to the change description? > Sorry but I don't follow your reasoning here. Are you saying that this

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-09 Thread Joe Perches
On Sat, 2020-05-09 at 16:32 -0700, David Miller wrote: > From: Joe Perches > Date: Sat, 09 May 2020 15:42:36 -0700 > > > David, maybe I missed some notification about Jakub's role. > > > > What is Jakub's role in relation to the networking tree? > > He is the co-maintainer of the networking

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-09 Thread David Miller
From: Joe Perches Date: Sat, 09 May 2020 15:42:36 -0700 > David, maybe I missed some notification about Jakub's role. > > What is Jakub's role in relation to the networking tree? He is the co-maintainer of the networking tree and you should respect his actions and feedback as if it were coming

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-09 Thread Joe Perches
On Sat, 2020-05-09 at 11:13 -0700, Jakub Kicinski wrote: > On Sat, 9 May 2020 18:47:08 +0200 Christophe JAILLET wrote: > > Le 09/05/2020 à 03:54, Jakub Kicinski a écrit : > > > On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: > > > > @@ -527,8 +531,9 @@ static int

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-09 Thread Christophe JAILLET
Le 09/05/2020 à 20:13, Jakub Kicinski a écrit : On Sat, 9 May 2020 18:47:08 +0200 Christophe JAILLET wrote: Le 09/05/2020 à 03:54, Jakub Kicinski a écrit : On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: @@ -527,8 +531,9 @@ static int mac_sonic_platform_remove(struct

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-09 Thread Jakub Kicinski
On Sat, 9 May 2020 18:47:08 +0200 Christophe JAILLET wrote: > Le 09/05/2020 à 03:54, Jakub Kicinski a écrit : > > On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: > >> @@ -527,8 +531,9 @@ static int mac_sonic_platform_remove(struct > >> platform_device *pdev) > >>struct

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-09 Thread Christophe JAILLET
Le 09/05/2020 à 03:54, Jakub Kicinski a écrit : On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: @@ -527,8 +531,9 @@ static int mac_sonic_platform_remove(struct platform_device *pdev) struct sonic_local* lp = netdev_priv(dev); unregister_netdev(dev); -

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-09 Thread Markus Elfring
> While at it, rename a label in order to be slightly more informative and > split some too long lines. Would you like to add the tag “Fixes” to the change description? … > +++ b/drivers/net/ethernet/natsemi/macsonic.c > @@ -506,10 +506,14 @@ static int mac_sonic_platform_probe(struct >

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-08 Thread Jakub Kicinski
On Sat, 9 May 2020 11:57:44 +1000 (AEST) Finn Thain wrote: > On Fri, 8 May 2020, Jakub Kicinski wrote: > > On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: > > > Only macsonic has been compile tested. I don't have the needed setup to > > > compile xtsonic > > > > Well, we gotta do

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-08 Thread Finn Thain
On Fri, 8 May 2020, Jakub Kicinski wrote: > On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: > > Only macsonic has been compile tested. I don't have the needed setup to > > compile xtsonic > > Well, we gotta do that before we apply the patch :S > I've compiled xtsonic.c with this

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: > @@ -527,8 +531,9 @@ static int mac_sonic_platform_remove(struct > platform_device *pdev) > struct sonic_local* lp = netdev_priv(dev); > > unregister_netdev(dev); > - dma_free_coherent(lp->device, SIZEOF_SONIC_DESC *

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: > Only macsonic has been compile tested. I don't have the needed setup to > compile xtsonic Well, we gotta do that before we apply the patch :S Does the driver actually depend on some platform stuff, or can we do this: diff --git

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-08 Thread Finn Thain
On Fri, 8 May 2020, Christophe JAILLET wrote: > A call to 'dma_alloc_coherent()' is hidden in > 'sonic_alloc_descriptors()'. > > This is correctly freed in the remove function, but not in the error > handling path of the probe function. Fix it and add the missing > 'dma_free_coherent()'

[PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-08 Thread Christophe JAILLET
A call to 'dma_alloc_coherent()' is hidden in 'sonic_alloc_descriptors()'. This is correctly freed in the remove function, but not in the error handling path of the probe function. Fix it and add the missing 'dma_free_coherent()' call. While at it, rename a label in order to be slightly more