From: Josh Poimboeuf <jpoimboe@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Julia Lawall <julia.lawall@inria.fr>
Subject: [PATCH 2/2] unwind: Fix return value for already-queued case in unwind_deferred_request()
Date: Tue, 3 Feb 2026 13:59:33 -0800 [thread overview]
Message-ID: <bcc6a4662e6409ad827a24432aa7e2cb7fc06f37.1770155771.git.jpoimboe@kernel.org> (raw)
In-Reply-To: <cover.1770155771.git.jpoimboe@kernel.org>
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@kernel.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
prev parent reply other threads:[~2026-02-03 21:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-03 21:59 [PATCH 0/2] unwind: Fix a few edge cases " Josh Poimboeuf
2026-02-03 21:59 ` [PATCH 1/2] unwind: Fix negative bit check " Josh Poimboeuf
2026-02-03 21:59 ` Josh Poimboeuf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bcc6a4662e6409ad827a24432aa7e2cb7fc06f37.1770155771.git.jpoimboe@kernel.org \
--to=jpoimboe@kernel.org \
--cc=julia.lawall@inria.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®