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: <1268794724-8665-4-git-send-email-yong.zhang@windriver.com>
Date:	Wed, 17 Mar 2010 10:58:44 +0800
From:	Yong Zhang <yong.zhang@...driver.com>
To:	linux-kernel@...r.kernel.org
Cc:	mingo@...e.hu
Subject: [RFC PATCH 3/3] ratelimit: Fix return value when fail to get lock

>From log of commit edaac8e3167501cda336231d00611bf59c164346,
It seems that we want to suppress the callback when trylock
fails.

Signed-off-by: Yong Zhang <yong.zhang@...driver.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Christian Borntraeger <borntraeger@...ibm.com>
---
 lib/ratelimit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/ratelimit.c b/lib/ratelimit.c
index 29a10b3..358638f 100644
--- a/lib/ratelimit.c
+++ b/lib/ratelimit.c
@@ -40,7 +40,7 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
 	 * the entity that is holding the lock already:
 	 */
 	if (!spin_trylock_irqsave(&rs->lock, flags))
-		return 1;
+		return 0;
 
 	if (!rs->begin)
 		rs->begin = jiffies;
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ