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]
Message-ID: <20100114095120.59236446@nehalam>
Date:	Thu, 14 Jan 2010 09:51:20 -0800
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Mike McCormack <mikem@...g3k.org>
Cc:	Jarek Poplawski <jarkao2@...il.com>,
	David Miller <davem@...emloft.net>, mbreuer@...jas.com,
	flyboy@...il.com, rjw@...k.pl, netdev@...r.kernel.org
Subject: Re: [PATCH] sky2: safer transmit ring cleaning (v4)

On Thu, 14 Jan 2010 22:19:39 +0900
Mike McCormack <mikem@...g3k.org> wrote:

>  /* Number of list elements available for next tx */
>  static inline int tx_avail(const struct sky2_port *sky2)
>  {
> +	if (unlikely(!sky2->tx_ring))
> +		return 0;
>  	return sky2->tx_pending - tx_inuse(sky2);
>  }
>

Breaks in detach case

> @@ -1925,7 +1929,9 @@ static int sky2_down(struct net_device *dev)
>  	sky2_read32(hw, B0_IMSK);
>  
>  	synchronize_irq(hw->pdev->irq);
> -	napi_synchronize(&hw->napi);
> +	netif_tx_lock_bh(dev);
> +	napi_disable(&hw->napi);
> +	netif_stop_queue(dev);
>  
>  	spin_lock_bh(&sky2->phy_lock);
>  	sky2_phy_power_down(hw, port);
> @@ -1939,6 +1945,8 @@ static int sky2_down(struct net_device *dev)
>  	sky2_rx_clean(sky2);
>  
>  	sky2_free_buffers(sky2);
> +	napi_enable(&hw->napi);
> +	netif_tx_unlock_bh(dev);
>  
>  	return 0;

Breaks on dual ported boards
--
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