[PATCH v5 36/36] sched: Enable context analysis for core.c and fair.c
Bart Van Assche
bvanassche at acm.org
Mon Jan 12 22:04:59 UTC 2026
On 12/19/25 8:40 AM, Marco Elver wrote:
> diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h
> index a63f65aa5bdd..a22248aebcf9 100644
> --- a/include/linux/sched/signal.h
> +++ b/include/linux/sched/signal.h
> @@ -738,10 +738,12 @@ static inline int thread_group_empty(struct task_struct *p)
> (thread_group_leader(p) && !thread_group_empty(p))
>
> extern struct sighand_struct *lock_task_sighand(struct task_struct *task,
> - unsigned long *flags);
> + unsigned long *flags)
> + __acquires(&task->sighand->siglock);
I think the above annotation is wrong and should be changed into
__cond_acquires(nonnull, &task->sighand->siglock). My understanding of
the code in kernel/signal.c is that lock_task_sighand() only returns
with sighand->siglock acquired if it returns a non-NULL pointer.
Bart.
More information about the Linux-security-module-archive
mailing list