diff options
author | Jiri Slaby <jslaby@suse.cz> | 2010-09-04 02:08:41 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-06 18:29:18 -0700 |
commit | ca1cef3a3a8af961f504abfcf9e13dac088e1ad1 (patch) | |
tree | e7a09c304271f05c88fdc1d787bca576163afa93 /drivers/net/bna/bnad.c | |
parent | e8f7f43a4ad451ecfb2689985f99a9e276a08bba (diff) | |
download | lwn-ca1cef3a3a8af961f504abfcf9e13dac088e1ad1.tar.gz lwn-ca1cef3a3a8af961f504abfcf9e13dac088e1ad1.zip |
NET: bna, fix lock imbalance
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bna/bnad.c')
-rw-r--r-- | drivers/net/bna/bnad.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/bna/bnad.c b/drivers/net/bna/bnad.c index 44adc7aefddc..8158fb93cb4c 100644 --- a/drivers/net/bna/bnad.c +++ b/drivers/net/bna/bnad.c @@ -2702,7 +2702,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); @@ -2715,6 +2715,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); } |