diff options
author | Ivan Vecera <ivecera@redhat.com> | 2016-02-26 08:15:50 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-01 20:19:43 (GMT) |
commit | a7f4b98896f6aede26431a3017d32d722fcec5cb (patch) | |
tree | d1addca6a45844f739c158570b8c74fa58366126 /drivers/net | |
parent | c44a72a5e8c16751af456cd711720c3aabd40cdd (diff) | |
download | linux-a7f4b98896f6aede26431a3017d32d722fcec5cb.tar.xz |
bna: fix list corruption
Use list_move_tail() to move MAC address entry from list of pending
to list of active entries. Simple list_add_tail() leaves the entry
also in the first list, this leads to list corruption.
Cc: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Acked-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bna_tx_rx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c index 04b0d16..95bc470 100644 --- a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c +++ b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c @@ -987,7 +987,7 @@ bna_rxf_ucast_cfg_apply(struct bna_rxf *rxf) if (!list_empty(&rxf->ucast_pending_add_q)) { mac = list_first_entry(&rxf->ucast_pending_add_q, struct bna_mac, qe); - list_add_tail(&mac->qe, &rxf->ucast_active_q); + list_move_tail(&mac->qe, &rxf->ucast_active_q); bna_bfi_ucast_req(rxf, mac, BFI_ENET_H2I_MAC_UCAST_ADD_REQ); return 1; } |