linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Swaraj Gaikwad <swarajgaikwad1925@gmail.com>
To: 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, swarajgaikwad1925@gmail.com,
	syzbot+b1546ad4a95331b2101e@syzkaller.appspotmail.com,
	vbabka@suse.cz
Subject: Re: [PATCH] slab: fix kmalloc_nolock() context check for PREEMPT_RT
Date: Fri, 19 Dec 2025 19:21:43 +0530	[thread overview]
Message-ID: <20251219135143.7337-1-swarajgaikwad1925@gmail.com> (raw)
In-Reply-To: <aUVTJyd74OoCtSyN@redhat.com>

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.

Swaraj


  reply	other threads:[~2025-12-19 13:51 UTC|newest]

Thread overview: 7+ 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 [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=20251219135143.7337-1-swarajgaikwad1925@gmail.com \
    --to=swarajgaikwad1925@gmail.com \
    --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=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=syzbot+b1546ad4a95331b2101e@syzkaller.appspotmail.com \
    --cc=vbabka@suse.cz \
    /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