Subject: linux-next: manual merge of the slab tree with the slab-fixes tree

From: Mark Brown <[email-masked]>
Date: Wed, 21 Jan 2026 16:11:17 +0000

Hi all,

Today's linux-next merge of the slab tree got a conflict in:

  mm/slub.c

between commit:

  99a3e3a1cfc93 ("slab: fix kmalloc_nolock() context check for PREEMPT_RT")

from the slab-fixes tree and commit:

  da6ed0180825d ("slab: simplify kmalloc_nolock()")
  a4ae75d1b6a24 ("slab: fix kmalloc_nolock() context check for PREEMPT_RT")

from the slab tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc mm/slub.c
index c58e664bb312a,331d274ba0a8c..0000000000000
--- a/mm/slub.c
+++ b/mm/slub.c
@@@ -5694,13 -5166,13 +5166,13 @@@ void *kmalloc_nolock_noprof(size_t size
  	if (unlikely(!size))
  		return ZERO_SIZE_PTR;
  
+ 	/*
+ 	 * See the comment for the same check in
+ 	 * alloc_frozen_pages_nolock_noprof()
+ 	 */
 -	if (IS_ENABLED(CONFIG_PREEMPT_RT) && (in_nmi() || in_hardirq()))
 +	if (IS_ENABLED(CONFIG_PREEMPT_RT) && !preemptible())
- 		/*
- 		 * kmalloc_nolock() in PREEMPT_RT is not supported from
- 		 * non-preemptible context because local_lock becomes a
- 		 * sleeping lock on RT.
- 		 */
  		return NULL;
  retry:
  	if (unlikely(size > KMALLOC_MAX_CACHE_SIZE))
  		return NULL;