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]
Message-ID: <20260208155935.72687-1-neelb2403@gmail.com>
Date: Sun,  8 Feb 2026 10:59:35 -0500
From: Neel Bullywon <neelb2403@...il.com>
To: apw@...onical.com,
	joe@...ches.com
Cc: dwaipayanray1@...il.com,
	lukas.bulwahn@...il.com,
	andriy.shevchenko@...el.com,
	linux-kernel@...r.kernel.org,
	Neel Bullywon <neelb2403@...il.com>
Subject: [PATCH] checkpatch: suggest fsleep() for short msleep() calls

Update the MSLEEP warning to suggest fsleep() as a duration based
sleep API. fsleep() autoselects the best sleep mechanism (udelay,
usleep_range, or msleep) based on the requested duration, making
it the preferred replacement for short msleep() calls.

Suggested-by: Andy Shevchenko <andriy.shevchenko@...el.com>
Signed-off-by: Neel Bullywon <neelb2403@...il.com>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c0250244cf7a..c27045f9f13d 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -6636,7 +6636,7 @@ sub process {
 		if ($line =~ /\bmsleep\s*\((\d+)\);/) {
 			if ($1 < 20) {
 				WARN("MSLEEP",
-				     "msleep < 20ms can sleep for up to 20ms; see function description of msleep().\n" . $herecurr);
+				     "msleep < 20ms can sleep for up to 20ms; see function description of fsleep().\n" . $herecurr);
 			}
 		}
 

base-commit: e7aa57247700733e52a8e2e4dee6a52c2a76de02
-- 
2.44.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ