From: Vlastimil Babka <vbabka@suse.cz>
To: Swaraj Gaikwad <swarajgaikwad1925@gmail.com>, lgoncalv@redhat.com
Cc: akpm@linux-foundation.org, ast@kernel.org, bigeasy@linutronix.de,
cl@gentwo.org, clrkwllms@kernel.org,
david.hunter.linux@gmail.com, harry.yoo@oracle.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-rt-devel@lists.linux.dev, rientjes@google.com,
roman.gushchin@linux.dev, rostedt@goodmis.org,
skhan@linuxfoundation.org,
syzbot+b1546ad4a95331b2101e@syzkaller.appspotmail.com,
Hao Li <hao.li@linux.dev>
Subject: Re: [PATCH] slab: fix kmalloc_nolock() context check for PREEMPT_RT
Date: Tue, 13 Jan 2026 14:59:38 +0100 [thread overview]
Message-ID: <ce970598-fbef-4b58-bde6-fb099f1cb6be@suse.cz> (raw)
In-Reply-To: <56598d76-02ca-490f-a100-0f223fb5717e@suse.cz>
On 1/5/26 8:19 PM, Vlastimil Babka wrote:
> On 12/19/25 14:51, Swaraj Gaikwad wrote:
>> I agree that we can simplify this. I think !preemptible() would be
>> the most descriptive choice here, as it directly expresses the
>> constraint, we cannot take a sleeping lock when preemption is
>> disabled.
>> The updated check would be:
>> if (IS_ENABLED(CONFIG_PREEMPT_RT) && !preemptible())
>>
>> I'll send a v2 with this change unless there are objections.
Ping? Are you planning to? Otherwise we have to do it ourselves as we
can't leave things broken?
Also Sebastian do you agree? Thanks.
> I think it's the best solution for now, so please do. We can change it back
> later with sheaves, as Hao Li pointed out. It will limit PREEMPT_RT
> kmalloc_nolock() for now. Steven explained to me it's the tracepoints
> disabling preemption, but that will be also improved soon:
>
> https://lore.kernel.org/all/20251219120607.7371034e@gandalf.local.home/
>
>
>> Swaraj
>
next prev parent reply other threads:[~2026-01-13 13:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 8:57 Swaraj Gaikwad
2025-12-19 9:31 ` Vlastimil Babka
2025-12-19 13:29 ` Luis Claudio R. Goncalves
2025-12-19 13:51 ` Swaraj Gaikwad
2026-01-05 19:19 ` Vlastimil Babka
2026-01-13 13:59 ` Vlastimil Babka [this message]
2025-12-19 15:22 ` Hao Li
2025-12-19 18:02 ` Luis Claudio R. Goncalves
2025-12-19 15:52 ` Vlastimil Babka
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=ce970598-fbef-4b58-bde6-fb099f1cb6be@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=ast@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=cl@gentwo.org \
--cc=clrkwllms@kernel.org \
--cc=david.hunter.linux@gmail.com \
--cc=hao.li@linux.dev \
--cc=harry.yoo@oracle.com \
--cc=lgoncalv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=rostedt@goodmis.org \
--cc=skhan@linuxfoundation.org \
--cc=swarajgaikwad1925@gmail.com \
--cc=syzbot+b1546ad4a95331b2101e@syzkaller.appspotmail.com \
/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