From 629dd3a2197ce5c78bc59bfebac71d6281bcea5a Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Fri, 7 Aug 2026 23:07:18 -0400 Subject: [PATCH] queue-6.12: fix duplicate inline in mm/slab backport The 6.12 backport of d9e6a7623938 ("mm/slab: prevent unbounded recursion in free path with new kmalloc type") adds a stable-only adjustment that marks need_kmalloc_no_objext() __always_inline, because mem_alloc_profiling_permanently_disabled() is __init in 6.12. The adjustment was written as: static __always_inline inline bool need_kmalloc_no_objext(void) __always_inline already expands to "inline __attribute__((__always_inline__))" and inline is itself a macro, so the declaration ends up with two inline specifiers. clang rejects that with -Wduplicate-decl-specifier, which is an error with CONFIG_WERROR: In file included from mm/mempool.c:21: mm/slab.h:572:24: error: duplicate 'inline' declaration specifier [-Werror,-Wduplicate-decl-specifier] 572 | static __always_inline inline bool need_kmalloc_no_objext(void) | ^ Reported by KernelCI as a build regression on stable-rc/linux-6.12.y, and confirmed by Nathan Chancellor, who pointed out the correct fix: drop the redundant inline and keep __always_inline. The 6.18 and 7.1 backports of the same commit use plain "static inline" and are not affected. Reported-by: KernelCI bot Reported-by: Nathan Chancellor Link: https://lore.kernel.org/stable/20260807180245.GA4067747@ax162/ Signed-off-by: Sasha Levin --- .../mm-slab-prevent-unbounded-recursion-in-free-path-wit.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/queue-6.12/mm-slab-prevent-unbounded-recursion-in-free-path-wit.patch b/queue-6.12/mm-slab-prevent-unbounded-recursion-in-free-path-wit.patch index 3c3b057318..ee935e3622 100644 --- a/queue-6.12/mm-slab-prevent-unbounded-recursion-in-free-path-wit.patch +++ b/queue-6.12/mm-slab-prevent-unbounded-recursion-in-free-path-wit.patch @@ -207,7 +207,7 @@ index b65d2462b3fdb..34a3d65b4ef5f 100644 + * Memcg usually doesn't need them for normal kmalloc caches, but kmalloc types + * with a priority higher than KMALLOC_CGROUP can be aliased with KMALLOC_NORMAL. + */ -+static __always_inline inline bool need_kmalloc_no_objext(void) ++static __always_inline bool need_kmalloc_no_objext(void) +{ + if (!mem_alloc_profiling_permanently_disabled()) + return true; -- 2.47.3