Re: [PATCH] slab: fix kmalloc_nolock() context check for PREEMPT_RT
From: Swaraj Gaikwad
Date: Fri Dec 19 2025 - 08:51:55 EST
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