All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] iavf: fix double-release of rtnl_lock
@ 2020-12-03  2:18 ` Jakub Kicinski
  0 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2020-12-03  2:18 UTC (permalink / raw)
  To: jesse.brandeburg, anthony.l.nguyen
  Cc: intel-wired-lan, netdev, jakub.pawlak, Jakub Kicinski

This code does not jump to exit on an error in iavf_lan_add_device(),
so the rtnl_unlock() from the normal path will follow.

Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 95543dfd4fe7..0a867d64d467 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -1829,21 +1829,19 @@ static int iavf_init_get_resources(struct iavf_adapter *adapter)
 		}
 	}
 
 	adapter->netdev_registered = true;
 
 	netif_tx_stop_all_queues(netdev);
 	if (CLIENT_ALLOWED(adapter)) {
 		err = iavf_lan_add_device(adapter);
-		if (err) {
-			rtnl_unlock();
+		if (err)
 			dev_info(&pdev->dev, "Failed to add VF to client API service list: %d\n",
 				 err);
-		}
 	}
 	dev_info(&pdev->dev, "MAC address: %pM\n", adapter->hw.mac.addr);
 	if (netdev->features & NETIF_F_GRO)
 		dev_info(&pdev->dev, "GRO is enabled\n");
 
 	adapter->state = __IAVF_DOWN;
 	set_bit(__IAVF_VSI_DOWN, adapter->vsi.state);
 	rtnl_unlock();
-- 
2.26.2


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

* [Intel-wired-lan] [PATCH net] iavf: fix double-release of rtnl_lock
@ 2020-12-03  2:18 ` Jakub Kicinski
  0 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2020-12-03  2:18 UTC (permalink / raw)
  To: intel-wired-lan

This code does not jump to exit on an error in iavf_lan_add_device(),
so the rtnl_unlock() from the normal path will follow.

Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 95543dfd4fe7..0a867d64d467 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -1829,21 +1829,19 @@ static int iavf_init_get_resources(struct iavf_adapter *adapter)
 		}
 	}
 
 	adapter->netdev_registered = true;
 
 	netif_tx_stop_all_queues(netdev);
 	if (CLIENT_ALLOWED(adapter)) {
 		err = iavf_lan_add_device(adapter);
-		if (err) {
-			rtnl_unlock();
+		if (err)
 			dev_info(&pdev->dev, "Failed to add VF to client API service list: %d\n",
 				 err);
-		}
 	}
 	dev_info(&pdev->dev, "MAC address: %pM\n", adapter->hw.mac.addr);
 	if (netdev->features & NETIF_F_GRO)
 		dev_info(&pdev->dev, "GRO is enabled\n");
 
 	adapter->state = __IAVF_DOWN;
 	set_bit(__IAVF_VSI_DOWN, adapter->vsi.state);
 	rtnl_unlock();
-- 
2.26.2


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

* Re: [PATCH net] iavf: fix double-release of rtnl_lock
  2020-12-03  2:18 ` [Intel-wired-lan] " Jakub Kicinski
@ 2020-12-03 17:04   ` Nguyen, Anthony L
  -1 siblings, 0 replies; 8+ messages in thread
From: Nguyen, Anthony L @ 2020-12-03 17:04 UTC (permalink / raw)
  To: kuba, Brandeburg, Jesse; +Cc: Pawlak, Jakub, netdev, intel-wired-lan

On Wed, 2020-12-02 at 18:18 -0800, Jakub Kicinski wrote:
> This code does not jump to exit on an error in iavf_lan_add_device(),
> so the rtnl_unlock() from the normal path will follow.
> 
> Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
>  drivers/net/ethernet/intel/iavf/iavf_main.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com>

Did you want to apply this or did you want me to take it?

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

* [Intel-wired-lan] [PATCH net] iavf: fix double-release of rtnl_lock
@ 2020-12-03 17:04   ` Nguyen, Anthony L
  0 siblings, 0 replies; 8+ messages in thread
From: Nguyen, Anthony L @ 2020-12-03 17:04 UTC (permalink / raw)
  To: intel-wired-lan

On Wed, 2020-12-02 at 18:18 -0800, Jakub Kicinski wrote:
> This code does not jump to exit on an error in iavf_lan_add_device(),
> so the rtnl_unlock() from the normal path will follow.
> 
> Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
>  drivers/net/ethernet/intel/iavf/iavf_main.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com>

Did you want to apply this or did you want me to take it?

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

* Re: [PATCH net] iavf: fix double-release of rtnl_lock
  2020-12-03 17:04   ` [Intel-wired-lan] " Nguyen, Anthony L
@ 2020-12-03 17:41     ` Jakub Kicinski
  -1 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2020-12-03 17:41 UTC (permalink / raw)
  To: Nguyen, Anthony L
  Cc: Brandeburg, Jesse, Pawlak, Jakub, netdev, intel-wired-lan

On Thu, 3 Dec 2020 17:04:14 +0000 Nguyen, Anthony L wrote:
> On Wed, 2020-12-02 at 18:18 -0800, Jakub Kicinski wrote:
> > This code does not jump to exit on an error in iavf_lan_add_device(),
> > so the rtnl_unlock() from the normal path will follow.
> > 
> > Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine")
> > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> > ---
> >  drivers/net/ethernet/intel/iavf/iavf_main.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)  
> 
> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> 
> Did you want to apply this or did you want me to take it?

Please take it, I'm currently running with the assumption that you'll
take all Intel patches (minus some corner cases, maybe, like patches
which are part of some cross-tree series with dependencies).

Thanks!

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

* [Intel-wired-lan] [PATCH net] iavf: fix double-release of rtnl_lock
@ 2020-12-03 17:41     ` Jakub Kicinski
  0 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2020-12-03 17:41 UTC (permalink / raw)
  To: intel-wired-lan

On Thu, 3 Dec 2020 17:04:14 +0000 Nguyen, Anthony L wrote:
> On Wed, 2020-12-02 at 18:18 -0800, Jakub Kicinski wrote:
> > This code does not jump to exit on an error in iavf_lan_add_device(),
> > so the rtnl_unlock() from the normal path will follow.
> > 
> > Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine")
> > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> > ---
> >  drivers/net/ethernet/intel/iavf/iavf_main.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)  
> 
> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> 
> Did you want to apply this or did you want me to take it?

Please take it, I'm currently running with the assumption that you'll
take all Intel patches (minus some corner cases, maybe, like patches
which are part of some cross-tree series with dependencies).

Thanks!

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

* RE: [Intel-wired-lan] [PATCH net] iavf: fix double-release of rtnl_lock
  2020-12-03 17:41     ` [Intel-wired-lan] " Jakub Kicinski
@ 2020-12-14 21:23       ` Jankowski, Konrad0
  -1 siblings, 0 replies; 8+ messages in thread
From: Jankowski, Konrad0 @ 2020-12-14 21:23 UTC (permalink / raw)
  To: Jakub Kicinski, Nguyen, Anthony L; +Cc: netdev, intel-wired-lan, Pawlak, Jakub



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Jakub Kicinski
> Sent: czwartek, 3 grudnia 2020 18:41
> To: Nguyen, Anthony L <anthony.l.nguyen@intel.com>
> Cc: netdev@vger.kernel.org; intel-wired-lan@lists.osuosl.org; Pawlak, Jakub
> <jakub.pawlak@intel.com>
> Subject: Re: [Intel-wired-lan] [PATCH net] iavf: fix double-release of rtnl_lock
> 
> On Thu, 3 Dec 2020 17:04:14 +0000 Nguyen, Anthony L wrote:
> > On Wed, 2020-12-02 at 18:18 -0800, Jakub Kicinski wrote:
> > > This code does not jump to exit on an error in
> > > iavf_lan_add_device(), so the rtnl_unlock() from the normal path will
> follow.
> > >
> > > Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine")
> > > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> > > ---
> > >  drivers/net/ethernet/intel/iavf/iavf_main.c | 4 +---
> > >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> >
> > Did you want to apply this or did you want me to take it?
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Sowackiego 173 | 80-298 Gdask | Sd Rejonowy Gdask Pnoc | VII Wydzia Gospodarczy Krajowego Rejestru Sdowego - KRS 101882 | NIP 957-07-52-316 | Kapita zakadowy 200.000 PLN.
Ta wiadomo wraz z zacznikami jest przeznaczona dla okrelonego adresata i moe zawiera informacje poufne. W razie przypadkowego otrzymania tej wiadomoci, prosimy o powiadomienie nadawcy oraz trwae jej usunicie; jakiekolwiek przegldanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
 


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

* [Intel-wired-lan] [PATCH net] iavf: fix double-release of rtnl_lock
@ 2020-12-14 21:23       ` Jankowski, Konrad0
  0 siblings, 0 replies; 8+ messages in thread
From: Jankowski, Konrad0 @ 2020-12-14 21:23 UTC (permalink / raw)
  To: intel-wired-lan



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Jakub Kicinski
> Sent: czwartek, 3 grudnia 2020 18:41
> To: Nguyen, Anthony L <anthony.l.nguyen@intel.com>
> Cc: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org; Pawlak, Jakub
> <jakub.pawlak@intel.com>
> Subject: Re: [Intel-wired-lan] [PATCH net] iavf: fix double-release of rtnl_lock
> 
> On Thu, 3 Dec 2020 17:04:14 +0000 Nguyen, Anthony L wrote:
> > On Wed, 2020-12-02 at 18:18 -0800, Jakub Kicinski wrote:
> > > This code does not jump to exit on an error in
> > > iavf_lan_add_device(), so the rtnl_unlock() from the normal path will
> follow.
> > >
> > > Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine")
> > > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> > > ---
> > >  drivers/net/ethernet/intel/iavf/iavf_main.c | 4 +---
> > >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> >
> > Did you want to apply this or did you want me to take it?
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Sowackiego 173 | 80-298 Gdask | Sd Rejonowy Gdask Pnoc | VII Wydzia Gospodarczy Krajowego Rejestru Sdowego - KRS 101882 | NIP 957-07-52-316 | Kapita zakadowy 200.000 PLN.
Ta wiadomo wraz z zacznikami jest przeznaczona dla okrelonego adresata i moe zawiera informacje poufne. W razie przypadkowego otrzymania tej wiadomoci, prosimy o powiadomienie nadawcy oraz trwae jej usunicie; jakiekolwiek przegldanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
 


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

end of thread, other threads:[~2020-12-14 21:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03  2:18 [PATCH net] iavf: fix double-release of rtnl_lock Jakub Kicinski
2020-12-03  2:18 ` [Intel-wired-lan] " Jakub Kicinski
2020-12-03 17:04 ` Nguyen, Anthony L
2020-12-03 17:04   ` [Intel-wired-lan] " Nguyen, Anthony L
2020-12-03 17:41   ` Jakub Kicinski
2020-12-03 17:41     ` [Intel-wired-lan] " Jakub Kicinski
2020-12-14 21:23     ` Jankowski, Konrad0
2020-12-14 21:23       ` Jankowski, Konrad0

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.