public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [net-next 1/1] bna: PCI Probe Conf Lock Fix
@ 2011-09-22  0:31 Rasesh Mody
  2011-09-22  0:42 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Rasesh Mody @ 2011-09-22  0:31 UTC (permalink / raw)
  To: netdev; +Cc: dan.carpenter, adapter_linux_open_src_team, Rasesh Mody

If register_netdev() fails now, then we call mutex_unlock(&bnad->conf_mutex);
on the error path, but it's already unlocked. So we acquire the lock in error
path which will be later unlocked after the cleanup.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
---
 drivers/net/ethernet/brocade/bna/bnad.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index abca139..db6c097 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.c
+++ b/drivers/net/ethernet/brocade/bna/bnad.c
@@ -3359,6 +3359,7 @@ probe_success:
 	return 0;
 
 probe_uninit:
+	mutex_lock(&bnad->conf_mutex);
 	bnad_res_free(bnad, &bnad->mod_res_info[0], BNA_MOD_RES_T_MAX);
 disable_ioceth:
 	bnad_ioceth_disable(bnad);
-- 
1.7.1

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

* Re: [net-next 1/1] bna: PCI Probe Conf Lock Fix
  2011-09-22  0:31 [net-next 1/1] bna: PCI Probe Conf Lock Fix Rasesh Mody
@ 2011-09-22  0:42 ` David Miller
  2011-09-22  0:54   ` Rasesh Mody
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2011-09-22  0:42 UTC (permalink / raw)
  To: rmody; +Cc: netdev, dan.carpenter, adapter_linux_open_src_team

From: Rasesh Mody <rmody@brocade.com>
Date: Wed, 21 Sep 2011 17:31:50 -0700

> If register_netdev() fails now, then we call mutex_unlock(&bnad->conf_mutex);
> on the error path, but it's already unlocked. So we acquire the lock in error
> path which will be later unlocked after the cleanup.
> 
> Signed-off-by: Rasesh Mody <rmody@brocade.com>

Applied, but I had to add:

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

Please don't leave out bug reporter credit like this.

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

* RE: [net-next 1/1] bna: PCI Probe Conf Lock Fix
  2011-09-22  0:42 ` David Miller
@ 2011-09-22  0:54   ` Rasesh Mody
  0 siblings, 0 replies; 3+ messages in thread
From: Rasesh Mody @ 2011-09-22  0:54 UTC (permalink / raw)
  To: David Miller
  Cc: netdev@vger.kernel.org, dan.carpenter@oracle.com,
	adapter_linux_open_src_team@blc-10-4.brocade.com

>From: David Miller [mailto:davem@davemloft.net]
>Sent: Wednesday, September 21, 2011 5:42 PM
>
>Applied, but I had to add:
>
>Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>
>Please don't leave out bug reporter credit like this.

Thanks for doing it this time, we'll take care of adding the bug reporter in future.

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

end of thread, other threads:[~2011-09-22  0:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-22  0:31 [net-next 1/1] bna: PCI Probe Conf Lock Fix Rasesh Mody
2011-09-22  0:42 ` David Miller
2011-09-22  0:54   ` Rasesh Mody

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox