]> git.baikalelectronics.ru Git - kernel.git/commit
once: fix section mismatch on clang builds
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Nov 2022 17:12:39 +0000 (18:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Nov 2022 18:06:42 +0000 (19:06 +0100)
commit56bddfe58a071a2c34960644299b9b9a0621fd7d
treecda0b52998dc941ac4e1fbd3e49bff81abb67ab6
parentbea86cf1d58d25fc54d0a1c45ce7003e55208e9d
once: fix section mismatch on clang builds

On older kernels (5.4 and older), building the kernel with clang can
cause the section name to end up with "" in them, which can cause lots
of runtime issues as that is not normally a valid portion of the string.

This was fixed up in newer kernels with commit 9c79cdaf17c3 ("treewide:
Convert macro and uses of __section(foo) to __section("foo")") but
that's too heavy-handed for older kernels.

So for now, fix up the problem that commit aace4a56fac3 ("once: add
DO_ONCE_SLOW() for sleepable contexts") caused by being backported by
removing the "" characters from the section definition.

Reported-by: Oleksandr Tymoshenko <ovt@google.com>
Reported-by: Yongqin Liu <yongqin.liu@linaro.org>
Tested-by: Yongqin Liu <yongqin.liu@linaro.org>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
Link: https://lore.kernel.org/r/20221029011211.4049810-1-ovt@google.com
Link: https://lore.kernel.org/r/CAMSo37XApZ_F5nSQYWFsSqKdMv_gBpfdKG3KN1TDB+QNXqSh0A@mail.gmail.com
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Willy Tarreau <w@1wt.eu>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: David S. Miller <davem@davemloft.net>
Cc: Sasha Levin <sashal@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/once.h