All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] bna: fix list corruption
@ 2016-02-26  8:15 Ivan Vecera
  2016-02-26 23:48 ` Rasesh Mody
  2016-03-01 20:20 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Ivan Vecera @ 2016-02-26  8:15 UTC (permalink / raw
  To: netdev; +Cc: Rasesh Mody

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>
---
 drivers/net/ethernet/brocade/bna/bna_tx_rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 	}
-- 
2.4.10

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH net] bna: fix list corruption
  2016-02-26  8:15 [PATCH net] bna: fix list corruption Ivan Vecera
@ 2016-02-26 23:48 ` Rasesh Mody
  2016-03-01 20:20 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Rasesh Mody @ 2016-02-26 23:48 UTC (permalink / raw
  To: Ivan Vecera, netdev

> From: Ivan Vecera [mailto:ivecera@redhat.com]
> Sent: Friday, February 26, 2016 12:16 AM
> 
> 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>

> ---
>  drivers/net/ethernet/brocade/bna/bna_tx_rx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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;
>  	}
> --
> 2.4.10

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] bna: fix list corruption
  2016-02-26  8:15 [PATCH net] bna: fix list corruption Ivan Vecera
  2016-02-26 23:48 ` Rasesh Mody
@ 2016-03-01 20:20 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-03-01 20:20 UTC (permalink / raw
  To: ivecera; +Cc: netdev, rasesh.mody

From: Ivan Vecera <ivecera@redhat.com>
Date: Fri, 26 Feb 2016 09:15:50 +0100

> 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>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-01 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-26  8:15 [PATCH net] bna: fix list corruption Ivan Vecera
2016-02-26 23:48 ` Rasesh Mody
2016-03-01 20:20 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.