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] [day] [month] [year] [list]
Message-ID: <4755B071.3050200@pobox.com>
Date:	Tue, 04 Dec 2007 14:54:25 -0500
From:	Jeff Garzik <jgarzik@...ox.com>
To:	Stephen Hemminger <shemminger@...ux-foundation.org>
CC:	netdev@...r.kernel.org
Subject: Re: [PATCH] sky2: recovery deadlock fix

Stephen Hemminger wrote:
> Prevent deadlock in sky2 recovery logic. sky2_down calls napi_synchronize
> which gets stuck if napi was already disabled. 
> 
> Fix by rearranging slightly and not calling napi_disable until after
> both ports are stopped. The napi_disable probably is being overly
> paranoid, but it is safe now.
> 
> Signed-off-by: Stephen Hemminger <shemminger@...ux-foundation.org>
> 
> ---
> Please apply for 2.6.24 (upstream-fixes)
> 
> --- a/drivers/net/sky2.c	2007-11-30 16:51:50.000000000 -0800
> +++ b/drivers/net/sky2.c	2007-11-30 16:54:52.000000000 -0800
> @@ -2906,16 +2906,14 @@ static void sky2_restart(struct work_str
>  	int i, err;
>  
>  	rtnl_lock();
> -	sky2_write32(hw, B0_IMSK, 0);
> -	sky2_read32(hw, B0_IMSK);
> -	napi_disable(&hw->napi);
> -
>  	for (i = 0; i < hw->ports; i++) {
>  		dev = hw->dev[i];
>  		if (netif_running(dev))
>  			sky2_down(dev);
>  	}
>  
> +	napi_disable(&hw->napi);
> +	sky2_write32(hw, B0_IMSK, 0);
>  	sky2_reset(hw);
>  	sky2_write32(hw, B0_IMSK, Y2_IS_BASE);
>  	napi_enable(&hw->napi);

applied #upstream-fixes


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