diff mbox

[1/1] NET: bna, fix lock imbalance

Message ID 1283602121-11443-1-git-send-email-jslaby@suse.cz
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Jiri Slaby Sept. 4, 2010, 12:08 p.m. UTC
bnad_set_rx_mode omit to unlock bna_lock on one fail path. Fix that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Debashis Dutt <ddutt@brocade.com>
Cc: Rasesh Mody <rmody@brocade.com>
Cc: David S. Miller <davem@davemloft.net>
---
 drivers/net/bna/bnad.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

David Miller Sept. 7, 2010, 1:29 a.m. UTC | #1
From: Jiri Slaby <jslaby@suse.cz>
Date: Sat,  4 Sep 2010 14:08:41 +0200

> bnad_set_rx_mode omit to unlock bna_lock on one fail path. Fix that.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/bna/bnad.c b/drivers/net/bna/bnad.c
index cbc1d56..a1a449a 100644
--- a/drivers/net/bna/bnad.c
+++ b/drivers/net/bna/bnad.c
@@ -2706,7 +2706,7 @@  bnad_set_rx_mode(struct net_device *netdev)
 			kzalloc((mc_count + 1) * ETH_ALEN,
 				GFP_ATOMIC);
 		if (!mcaddr_list)
-			return;
+			goto unlock;
 
 		memcpy(&mcaddr_list[0], &bnad_bcast_addr[0], ETH_ALEN);
 
@@ -2719,6 +2719,7 @@  bnad_set_rx_mode(struct net_device *netdev)
 		/* Should we enable BNAD_CF_ALLMULTI for err != 0 ? */
 		kfree(mcaddr_list);
 	}
+unlock:
 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
 }