* [PATCH net] bnx2x: add missing napi deletion in error path
@ 2013-03-15 15:27 Michal Schmidt
2013-03-16 8:18 ` Dmitry Kravkov
2013-03-17 16:27 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Michal Schmidt @ 2013-03-15 15:27 UTC (permalink / raw)
To: netdev; +Cc: Merav Sicron, Eilon Greenstein, Dmitry Kravkov, Yuval Mintz
If the hardware initialization fails in bnx2x_nic_load() after adding
napi objects, they would not be deleted. A subsequent attempt to unload
the bnx2x module detects a corruption in the napi list.
Add the missing napi deletion to the error path.
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index a923bc4..4046f97 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -2760,6 +2760,7 @@ load_error2:
bp->port.pmf = 0;
load_error1:
bnx2x_napi_disable(bp);
+ bnx2x_del_all_napi(bp);
/* clear pf_load status, as it was already set */
if (IS_PF(bp))
--
1.8.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH net] bnx2x: add missing napi deletion in error path
2013-03-15 15:27 [PATCH net] bnx2x: add missing napi deletion in error path Michal Schmidt
@ 2013-03-16 8:18 ` Dmitry Kravkov
2013-03-17 16:27 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Kravkov @ 2013-03-16 8:18 UTC (permalink / raw)
To: Michal Schmidt, netdev@vger.kernel.org
Cc: Merav Sicron, Eilon Greenstein, Yuval Mintz
> -----Original Message-----
> From: Michal Schmidt [mailto:mschmidt@redhat.com]
> Sent: Friday, March 15, 2013 5:28 PM
> To: netdev@vger.kernel.org
> Cc: Merav Sicron; Eilon Greenstein; Dmitry Kravkov; Yuval Mintz
> Subject: [PATCH net] bnx2x: add missing napi deletion in error path
>
> If the hardware initialization fails in bnx2x_nic_load() after adding
> napi objects, they would not be deleted. A subsequent attempt to unload
> the bnx2x module detects a corruption in the napi list.
>
> Add the missing napi deletion to the error path.
>
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
> ---
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> index a923bc4..4046f97 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> @@ -2760,6 +2760,7 @@ load_error2:
> bp->port.pmf = 0;
> load_error1:
> bnx2x_napi_disable(bp);
> + bnx2x_del_all_napi(bp);
>
> /* clear pf_load status, as it was already set */
> if (IS_PF(bp))
> --
> 1.8.1.4
>
Thanks, Michal!
Acked-by: Dmitry Kravkov <dmitry@broadcom.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] bnx2x: add missing napi deletion in error path
2013-03-15 15:27 [PATCH net] bnx2x: add missing napi deletion in error path Michal Schmidt
2013-03-16 8:18 ` Dmitry Kravkov
@ 2013-03-17 16:27 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2013-03-17 16:27 UTC (permalink / raw)
To: mschmidt; +Cc: netdev, meravs, eilong, dmitry, yuvalmin
From: Michal Schmidt <mschmidt@redhat.com>
Date: Fri, 15 Mar 2013 16:27:54 +0100
> If the hardware initialization fails in bnx2x_nic_load() after adding
> napi objects, they would not be deleted. A subsequent attempt to unload
> the bnx2x module detects a corruption in the napi list.
>
> Add the missing napi deletion to the error path.
>
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-17 16:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-15 15:27 [PATCH net] bnx2x: add missing napi deletion in error path Michal Schmidt
2013-03-16 8:18 ` Dmitry Kravkov
2013-03-17 16:27 ` David Miller
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).