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: <48A3F076.8080206@garzik.org>
Date:	Thu, 14 Aug 2008 04:44:38 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Ben Dooks <ben-linux@...ff.org>
CC:	netdev@...r.kernel.org
Subject: Re: AX88796: Fix locking in ethtool support

Ben Dooks wrote:
> Fix a pair of nasty locking problems in the ax88796 driver
> spotted by a sparse check:
> 
> warning: context imbalance in 'ax_get_settings' - wrong count at exit
> warning: context imbalance in 'ax_set_settings' - wrong count at exit
> 
> Signed-off-by: Ben Dooks <ben-linux@...ff.org>
> 
> Index: linux-2.6.27-rc2-quilt1/drivers/net/ax88796.c
> ===================================================================
> --- linux-2.6.27-rc2-quilt1.orig/drivers/net/ax88796.c	2008-08-07 17:15:01.000000000 +0100
> +++ linux-2.6.27-rc2-quilt1/drivers/net/ax88796.c	2008-08-07 17:17:45.000000000 +0100
> @@ -554,7 +554,7 @@ static int ax_get_settings(struct net_de
>  
>  	spin_lock_irqsave(&ax->mii_lock, flags);
>  	mii_ethtool_gset(&ax->mii, cmd);
> -	spin_lock_irqsave(&ax->mii_lock, flags);
> +	spin_unlock_irqrestore(&ax->mii_lock, flags);
>  
>  	return 0;
>  }
> @@ -567,7 +567,7 @@ static int ax_set_settings(struct net_de
>  
>  	spin_lock_irqsave(&ax->mii_lock, flags);
>  	rc = mii_ethtool_sset(&ax->mii, cmd);
> -	spin_lock_irqsave(&ax->mii_lock, flags);
> +	spin_unlock_irqrestore(&ax->mii_lock, flags);

applied


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