]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
unwind: Clarify calling context
authorPeter Zijlstra <peterz@infradead.org>
Mon, 22 Sep 2025 13:49:19 +0000 (15:49 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 29 Oct 2025 09:29:56 +0000 (10:29 +0100)
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

index d2cd3a7fd286dfe6bac088ee0a0b8123ecfe5a6b..6395192d7225ef037629e9c46bdbf0abd038b34a 100644 (file)
@@ -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;