Re: [PATCH, RFC] skge: Fix race in tx path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bart Van Assche <bvanassche@xxxxxxx> :
[...]
> diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c
> index dea0cb4..2d805b9 100644
> --- a/drivers/net/ethernet/marvell/skge.c
> +++ b/drivers/net/ethernet/marvell/skge.c
> @@ -2793,7 +2793,8 @@ static netdev_tx_t skge_xmit_frame(struct sk_buff *skb,
>  		tf->control |= BMU_EOF | BMU_IRQ_EOF;
>  	}
>  	/* Make sure all the descriptors written */
> -	wmb();
> +	skge->tx_ring.to_use = e->next;
> +	smp_wmb();
>  	td->control = BMU_OWN | BMU_SW | BMU_STF | control | len;
>  	wmb();

With this change it seems possible for skge_tx_done to unmap a buffer before
it is sent when the requests for skge_xmit_frame are close enough.

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


[Linux Kernel Discussion]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux Bluetooth Networking]     [Linux Networking Users]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Photo]     [Singles Social Networking]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Free Dating]

Add to Google Powered by Linux