Files
linux/drivers/misc
Catalin Marinas f4ea8e05f2 lkdtm/bugs: Do not confuse the clang/objtool with busy wait loop
Since commit eb972eab07 ("lkdtm/bugs: Add cases for BUG and PANIC
occurring in hardirq context"), building with clang for x86_64 results
in the following warnings:

vmlinux.o: warning: objtool: lkdtm_PANIC_IN_HARDIRQ(): unexpected end of section .text.lkdtm_PANIC_IN_HARDIRQ
vmlinux.o: warning: objtool: lkdtm_BUG_IN_HARDIRQ(): unexpected end of section .text.lkdtm_BUG_IN_HARDIRQ

caused by busy "while (wait_for_...);" loops. Add READ_ONCE() and
cpu_relax() to better indicate the intention and avoid any unwanted
compiler optimisations.

Fixes: eb972eab07 ("lkdtm/bugs: Add cases for BUG and PANIC occurring in hardirq context")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202512190111.jxFSqxUH-lkp@intel.com/
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2025-12-19 15:09:09 +00:00
..
2025-10-22 07:54:15 +02:00
2025-06-24 16:45:08 +01:00
2024-08-13 11:27:38 +02:00
2024-05-22 08:31:17 -04:00
2024-10-13 17:11:51 +02:00
2022-12-15 10:37:26 -08:00