]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commit
queue-6.12: fix duplicate inline in mm/slab backport
authorSasha Levin <sashal@kernel.org>
Sat, 8 Aug 2026 03:07:18 +0000 (23:07 -0400)
committerSasha Levin <sashal@kernel.org>
Sat, 8 Aug 2026 11:09:45 +0000 (07:09 -0400)
commit629dd3a2197ce5c78bc59bfebac71d6281bcea5a
tree84209e9314cd50b632a50048c06e52192e74dd85
parent1d84d765d91c0b7be175dcafb55ff62d8c2a9671
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 <bot@kernelci.org>
Reported-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/stable/20260807180245.GA4067747@ax162/
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-6.12/mm-slab-prevent-unbounded-recursion-in-free-path-wit.patch