From: Greg Kroah-Hartman Date: Tue, 1 Nov 2022 17:21:47 +0000 (+0100) Subject: 4.19-stable patches X-Git-Tag: v4.19.263~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe208c596b6823e0e74f0614fb0986747adead92;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: once-fix-section-mismatch-on-clang-builds.patch --- diff --git a/queue-4.19/once-fix-section-mismatch-on-clang-builds.patch b/queue-4.19/once-fix-section-mismatch-on-clang-builds.patch new file mode 100644 index 00000000000..291614cc390 --- /dev/null +++ b/queue-4.19/once-fix-section-mismatch-on-clang-builds.patch @@ -0,0 +1,53 @@ +From 76d0ecd42da6e2cc54980363ba790591c277f71c Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Tue, 1 Nov 2022 18:12:39 +0100 +Subject: once: fix section mismatch on clang builds + +From: Greg Kroah-Hartman + +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 33def8498fdd ("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 62c07983bef9 ("once: add +DO_ONCE_SLOW() for sleepable contexts") caused by being backported by +removing the "" characters from the section definition. + +Reported-by: Oleksandr Tymoshenko +Reported-by: Yongqin Liu +Tested-by: Yongqin Liu +Cc: Naresh Kamboju +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 +Cc: Eric Dumazet +Cc: Willy Tarreau +Cc: Christophe Leroy +Cc: David S. Miller +Cc: Sasha Levin +Cc: Nathan Chancellor +Signed-off-by: Greg Kroah-Hartman +--- + include/linux/once.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/linux/once.h b/include/linux/once.h +index bb58e1c3aa03..3a6671d961b9 100644 +--- a/include/linux/once.h ++++ b/include/linux/once.h +@@ -64,7 +64,7 @@ void __do_once_slow_done(bool *done, struct static_key_true *once_key, + #define DO_ONCE_SLOW(func, ...) \ + ({ \ + bool ___ret = false; \ +- static bool __section(".data.once") ___done = false; \ ++ static bool __section(.data.once) ___done = false; \ + static DEFINE_STATIC_KEY_TRUE(___once_key); \ + if (static_branch_unlikely(&___once_key)) { \ + ___ret = __do_once_slow_start(&___done); \ +-- +2.38.1 + diff --git a/queue-4.19/series b/queue-4.19/series index 84ef7bbccf0..92a44e41c19 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -75,3 +75,4 @@ alsa-aoa-fix-i2s-device-accounting.patch openvswitch-switch-from-warn-to-pr_warn.patch net-ehea-fix-possible-memory-leak-in-ehea_register_p.patch net-mlx5e-do-not-increment-esn-when-updating-ipsec-e.patch +once-fix-section-mismatch-on-clang-builds.patch