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

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