From: Thomas Gleixner <tglx@linutronix.de>
To: Waiman Long <longman@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Clark Williams <clrkwllms@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH] debugobjects: Don't call fill_pool() in early boot non-task context of RT kernel
Date: Wed, 20 May 2026 20:04:33 +0200 [thread overview]
Message-ID: <87qzn6vtxq.ffs@tglx> (raw)
In-Reply-To: <3fc2e03f-d34f-4b87-8421-e28e94247757@redhat.com>
On Wed, May 20 2026 at 12:57, Waiman Long wrote:
> On 5/20/26 12:43 PM, Waiman Long wrote:
>> It shouldn't really be a problem as fill_poll() will not called from
>> non-preemptible context after early boot, but the lockdep warning can
>> still cause confusion and anxiety. Fix that by further restricting the
>> call to only in_task() context during early boot.
>
> Sorry, the above paragraph isn't right. Will send out a v2.
And please trim the back trace while at it.
>> Fixes: 06e0ae988f6e ("debugobjects: Allow to refill the pool before SYSTEM_SCHEDULING")
>> Signed-off-by: Waiman Long <longman@redhat.com>
>> ---
>> lib/debugobjects.c | 7 +++++--
>> 1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/debugobjects.c b/lib/debugobjects.c
>> index 12e2e42e6a31..236ea5e716df 100644
>> --- a/lib/debugobjects.c
>> +++ b/lib/debugobjects.c
>> @@ -727,11 +727,14 @@ static void debug_objects_fill_pool(void)
>>
>> /*
>> * On RT enabled kernels the pool refill must happen in preemptible
>> - * context -- for !RT kernels we rely on the fact that spinlock_t and
>> + * context or in task context during early boot.
>> + *
>> + * For !RT kernels we rely on the fact that spinlock_t and
>> * raw_spinlock_t are basically the same type and this lock-type
>> * inversion works just fine.
>> */
>> - if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible() || system_state < SYSTEM_SCHEDULING) {
>> + if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible() ||
>> + (system_state < SYSTEM_SCHEDULING && in_task())) {
Conflicts with:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=core/urgent
next prev parent reply other threads:[~2026-05-20 18:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 16:43 [PATCH] debugobjects: Don't call fill_pool() in early boot non-task context of RT kernel Waiman Long
2026-05-20 16:57 ` Waiman Long
2026-05-20 18:04 ` Thomas Gleixner [this message]
2026-05-20 18:10 ` Waiman Long
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=87qzn6vtxq.ffs@tglx \
--to=tglx@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=bigeasy@linutronix.de \
--cc=clrkwllms@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=longman@redhat.com \
--cc=rostedt@goodmis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.