提交 ca1cef3a 编写于 作者: J Jiri Slaby 提交者: David S. Miller

NET: bna, fix lock imbalance

bnad_set_rx_mode omit to unlock bna_lock on one fail path. Fix that.
Signed-off-by: NJiri 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: NDavid S. Miller <davem@davemloft.net>
上级 e8f7f43a
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册