From: Bart Van Assche <bvanassche@acm.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Boqun Feng <boqun@kernel.org>, Waiman Long <longman@redhat.com>,
linux-kernel@vger.kernel.org, Marco Elver <elver@google.com>,
Christoph Hellwig <hch@lst.de>,
Steven Rostedt <rostedt@goodmis.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Nathan Chancellor <nathan@kernel.org>,
Kees Cook <kees@kernel.org>, Jann Horn <jannh@google.com>,
Bart Van Assche <bvanassche@acm.org>
Subject: [PATCH v2 2/4] signal: Fix the lock_task_sighand() annotation
Date: Wed, 25 Feb 2026 10:32:42 -0800 [thread overview]
Message-ID: <20260225183244.4035378-3-bvanassche@acm.org> (raw)
In-Reply-To: <20260225183244.4035378-1-bvanassche@acm.org>
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>
---
include/linux/sched/signal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h
index a22248aebcf9..a4835a7de07e 100644
--- a/include/linux/sched/signal.h
+++ b/include/linux/sched/signal.h
@@ -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)
next prev parent reply other threads:[~2026-02-25 18:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 18:32 [PATCH v2 0/4] Lock context annotation fixes Bart Van Assche
2026-02-25 18:32 ` [PATCH v2 1/4] locking: Fix rwlock and spinlock lock context annotations Bart Van Assche
2026-02-28 10:56 ` [tip: locking/core] " tip-bot2 for Bart Van Assche
2026-03-12 16:36 ` Bart Van Assche
2026-02-25 18:32 ` Bart Van Assche [this message]
2026-02-28 10:56 ` [tip: locking/core] signal: Fix the lock_task_sighand() annotation tip-bot2 for Bart Van Assche
2026-02-25 18:32 ` [PATCH v2 3/4] ww-mutex: Fix the ww_acquire_ctx function annotations Bart Van Assche
2026-02-28 10:56 ` [tip: locking/core] " tip-bot2 for Bart Van Assche
2026-02-25 18:32 ` [PATCH v2 4/4] Revert "lockdep: Annotate lockdep assertions for context analysis" Bart Van Assche
2026-02-25 18:40 ` Marco Elver
2026-02-25 19:22 ` Marco Elver
2026-02-25 19:27 ` Bart Van Assche
2026-02-25 18:44 ` [PATCH v2 0/4] Lock context annotation fixes Marco Elver
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=20260225183244.4035378-3-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=boqun@kernel.org \
--cc=elver@google.com \
--cc=hch@lst.de \
--cc=jannh@google.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=will@kernel.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®