This is a note to let you know that I've just added the patch titled once: fix section mismatch on clang builds to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: once-fix-section-mismatch-on-clang-builds.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 76d0ecd42da6e2cc54980363ba790591c277f71c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Date: Tue, 1 Nov 2022 18:12:39 +0100 Subject: once: fix section mismatch on clang builds From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> 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 <ovt@xxxxxxxxxx> Reported-by: Yongqin Liu <yongqin.liu@xxxxxxxxxx> Tested-by: Yongqin Liu <yongqin.liu@xxxxxxxxxx> Cc: Naresh Kamboju <naresh.kamboju@xxxxxxxxxx> Link: https://lore.kernel.org/r/20221029011211.4049810-1-ovt@xxxxxxxxxx Link: https://lore.kernel.org/r/CAMSo37XApZ_F5nSQYWFsSqKdMv_gBpfdKG3KN1TDB+QNXqSh0A@xxxxxxxxxxxxxx Cc: Christophe Leroy <christophe.leroy@xxxxxxxxxx> Cc: Eric Dumazet <edumazet@xxxxxxxxxx> Cc: Willy Tarreau <w@xxxxxx> Cc: Christophe Leroy <christophe.leroy@xxxxxxxxxx> Cc: David S. Miller <davem@xxxxxxxxxxxxx> Cc: Sasha Levin <sashal@xxxxxxxxxx> Cc: Nathan Chancellor <nathan@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- include/linux/once.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/once.h +++ b/include/linux/once.h @@ -64,7 +64,7 @@ void __do_once_slow_done(bool *done, str #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); \ Patches currently in stable-queue which might be from gregkh@xxxxxxxxxxxxxxxxxxx are queue-5.4/fbdev-smscufx-fix-several-use-after-free-bugs.patch queue-5.4/mm-hugetlb-take-hugetlb_lock-before-decrementing-h-resv_huge_pages.patch queue-5.4/xfs-finish-dfops-on-every-insert-range-shift-iteration.patch queue-5.4/usb-add-reset_resume-quirk-for-nvidia-jetson-devices-in-rcm.patch queue-5.4/drm-msm-dsi-fix-memory-corruption-with-too-many-bridges.patch queue-5.4/perf-auxtrace-fix-address-filter-symbol-name-match-for-modules.patch queue-5.4/cgroup-v1-add-disabled-controller-check-in-cgroup1_parse_param.patch queue-5.4/drm-msm-hdmi-fix-memory-corruption-with-too-many-bridges.patch queue-5.4/can-j1939-transport-j1939_session_skb_drop_old-spin_unlock_irqrestore-before-kfree_skb.patch queue-5.4/iio-light-tsl2583-fix-module-unloading.patch queue-5.4/usb-xhci-add-xhci_spurious_success-to-asm1042-despite-being-a-v0.96-controller.patch queue-5.4/xfs-force-the-log-after-remapping-a-synchronous-writes-file.patch queue-5.4/alsa-au88x0-use-explicitly-signed-char.patch queue-5.4/can-kvaser_usb-fix-possible-completions-during-init_completion.patch queue-5.4/s390-pci-add-missing-ex_table-entries-to-__pcistg_mio_inuser-__pcilg_mio_inuser.patch queue-5.4/usb-dwc3-gadget-don-t-set-imi-for-no_interrupt.patch queue-5.4/mtd-rawnand-marvell-use-correct-logic-for-nand-keep-config.patch queue-5.4/mmc-core-fix-kernel-panic-when-remove-non-standard-sdio-card.patch queue-5.4/xfs-clear-xfs_dq_freeing-if-we-can-t-lock-the-dquot-buffer-to-flush.patch queue-5.4/mac802154-fix-lqi-recording.patch queue-5.4/once-fix-section-mismatch-on-clang-builds.patch queue-5.4/kernfs-fix-use-after-free-in-__kernfs_remove.patch queue-5.4/xen-gntdev-don-t-ignore-kernel-unmapping-error.patch queue-5.4/s390-futex-add-missing-ex_table-entry-to-__futex_atomic_op.patch queue-5.4/xen-gntdev-prevent-leaking-grants.patch queue-5.4/alsa-use-del_timer_sync-before-freeing-timer.patch queue-5.4/tools-iio-iio_utils-fix-digit-calculation.patch queue-5.4/net-ieee802154-fix-error-return-code-in-dgram_bind.patch queue-5.4/usb-dwc3-gadget-stop-processing-more-requests-on-imi.patch queue-5.4/xhci-remove-device-endpoints-from-bandwidth-list-when-freeing-the-device.patch queue-5.4/usb-bdc-change-state-when-port-disconnected.patch