]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
signal: Fix the lock_task_sighand() annotation
authorBart Van Assche <bvanassche@acm.org>
Wed, 25 Feb 2026 18:32:42 +0000 (10:32 -0800)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 27 Feb 2026 15:40:19 +0000 (16:40 +0100)
lock_task_sighand() may return NULL. Make this clear in its lock context
annotation.

Fixes: 04e49d926f43 ("sched: Enable context analysis for core.c and fair.c")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Marco Elver <elver@google.com>
Link: https://patch.msgid.link/20260225183244.4035378-3-bvanassche@acm.org
include/linux/sched/signal.h

index a22248aebcf90259562b84622a0a86ea7fc2972b..a4835a7de07ee6650c340c014e46e998456d63a0 100644 (file)
@@ -739,7 +739,7 @@ static inline int thread_group_empty(struct task_struct *p)
 
 extern struct sighand_struct *lock_task_sighand(struct task_struct *task,
                                                unsigned long *flags)
-       __acquires(&task->sighand->siglock);
+       __cond_acquires(nonnull, &task->sighand->siglock);
 
 static inline void unlock_task_sighand(struct task_struct *task,
                                                unsigned long *flags)