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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bcc6a4662e6409ad827a24432aa7e2cb7fc06f37.1770155771.git.jpoimboe@kernel.org>
Date: Tue,  3 Feb 2026 13:59:33 -0800
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org,
	Peter Zijlstra <peterz@...radead.org>,
	Julia Lawall <julia.lawall@...ia.fr>
Subject: [PATCH 2/2] unwind: Fix return value for already-queued case in unwind_deferred_request()

The unwind_deferred_request() return value is documented in the function
header:

  * Return: 0 if the callback successfully was queued.
  *         1 if the callback is pending or was already executed.
  *         Negative if there's an error.

However, when the callback is already queued, it may return a non-1
value.  Fix it to match the documented behavior.

Fixes: be3d526a5b34 ("unwind deferred: Use bitmask to determine which callbacks to call")
Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
---
 kernel/unwind/deferred.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/unwind/deferred.c b/kernel/unwind/deferred.c
index 416af9b98bad..edf39c61130a 100644
--- a/kernel/unwind/deferred.c
+++ b/kernel/unwind/deferred.c
@@ -282,7 +282,7 @@ int unwind_deferred_request(struct unwind_work *work, u64 *cookie)
 		 * have also set pending and queued a callback.
 		 */
 		WARN_ON_ONCE(!(old_mask & UNWIND_PENDING));
-		return old_mask & bit_mask;
+		return !!(old_mask & bit_mask);
 	}
 
 	/* The work has been claimed, now schedule it. */
-- 
2.52.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ