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-next>] [day] [month] [year] [list]
Date:   Wed, 16 Mar 2022 20:51:14 +0800
From:   Zhen Lei <thunder.leizhen@...wei.com>
To:     Andrew Morton <akpm@...ux-foundation.org>,
        Will Deacon <will@...nel.org>, Ingo Molnar <mingo@...nel.org>,
        <linux-kernel@...r.kernel.org>
CC:     Zhen Lei <thunder.leizhen@...wei.com>
Subject: [PATCH] locking/refcount: Use REFCOUNT_WARN() to simplify code

To avoid the check "new > val" appears twice, and make the style
consistent with that in refcount_warn_saturate().

Signed-off-by: Zhen Lei <thunder.leizhen@...wei.com>
---
 lib/refcount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/refcount.c b/lib/refcount.c
index a207a8f22b3ca35..d36aa3fa728f53b 100644
--- a/lib/refcount.c
+++ b/lib/refcount.c
@@ -84,7 +84,7 @@ bool refcount_dec_not_one(refcount_t *r)
 
 		new = val - 1;
 		if (new > val) {
-			WARN_ONCE(new > val, "refcount_t: underflow; use-after-free.\n");
+			REFCOUNT_WARN("underflow; use-after-free");
 			return true;
 		}
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ