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: <20161020.142736.708413496078305369.davem@davemloft.net>
Date:   Thu, 20 Oct 2016 14:27:36 -0400 (EDT)
From:   David Miller <davem@...emloft.net>
To:     binoy.jayan@...aro.org
Cc:     ariel.elior@...gic.com, arnd@...db.de, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bnx2x: Replace semaphore stats_lock with mutex

From: Binoy Jayan <binoy.jayan@...aro.org>
Date: Thu, 20 Oct 2016 14:22:12 +0530

> stats_lock is used as a simple mutex

No, it is not.

> @@ -1976,8 +1973,8 @@ int bnx2x_stats_safe_exec(struct bnx2x *bp,
>  	/* Wait for statistics to end [while blocking further requests],
>  	 * then run supplied function 'safely'.
>  	 */
> -	rc = down_timeout(&bp->stats_lock, HZ / 10);
> -	if (unlikely(rc)) {
> +	rc = mutex_trylock(&bp->stats_lock);
> +	if (unlikely(!rc)) {

It uses timeouts therefore this conversion is not 1 to 1.

You're losing functionality and potentially adding a regression.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ