lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 10 May 2010 04:40:35 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	vapier@...too.org
Cc:	netdev@...r.kernel.org, uclinux-dist-devel@...ckfin.uclinux.org,
	sonic.zhang@...log.com
Subject: Re: [PATCH 06/11] netdev: bfin_mac: avoid tx skb overflows in the
 tx DMA ring

From: Mike Frysinger <vapier@...too.org>
Date: Sun,  9 May 2010 06:18:52 -0400

> From: Sonic Zhang <sonic.zhang@...log.com>
> 
> Signed-off-by: Sonic Zhang <sonic.zhang@...log.com>
> Signed-off-by: Mike Frysinger <vapier@...too.org>

This should never ever happen, it's a bug and you should print a warning
message when and if it does actually occur.

At any point where your ->next pointer hits tx_list_head, the queue
should have been stopped by your driver and therefore the networking
core will never pass another packet to you.

If this condition is actually triggering, it means you're not locking
properly or you have some race.

> ---
>  drivers/net/bfin_mac.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
> index 6d69bbb..0b5ea01 100644
> --- a/drivers/net/bfin_mac.c
> +++ b/drivers/net/bfin_mac.c
> @@ -920,6 +920,9 @@ static int bfin_mac_hard_start_xmit(struct sk_buff *skb,
>  	u32 data_align = (unsigned long)(skb->data) & 0x3;
>  	union skb_shared_tx *shtx = skb_tx(skb);
>  
> +	if (current_tx_ptr->next == tx_list_head)
> +		return NETDEV_TX_BUSY;
> +
>  	current_tx_ptr->skb = skb;
>  
>  	if (data_align == 0x2) {
> -- 
> 1.7.1
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ