The following commit has been merged into the perf/core branch of tip:
Commit-ID: 1e74829f36b5db19afc3d17f0a3750e9573710ae
Gitweb: https://git.kernel.org/tip/1e74829f36b5db19afc3d17f0a3750e9573710ae
Author: Peter Zijlstra <peterz@infradead.org>
AuthorDate: Mon, 22 Sep 2025 15:49:19 +02:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Wed, 29 Oct 2025 10:29:56 +01:00
unwind: Clarify calling context
The get_cookie() function hard relies on IRQs being disabled, but this
isn't immediately obvious when reading the function.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Link: https://patch.msgid.link/20250924080119.122507632@infradead.org
---
kernel/unwind/deferred.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/unwind/deferred.c b/kernel/unwind/deferred.c
index d2cd3a7..6395192 100644
--- a/kernel/unwind/deferred.c
+++ b/kernel/unwind/deferred.c
@@ -79,6 +79,8 @@ static u64 get_cookie(struct unwind_task_info *info)
{
u32 cnt = 1;
+ lockdep_assert_irqs_disabled();
+
if (info->id.cpu)
return info->id.id;