Pull misc fixes from Andrew Morton: "17 hotfixes. Eight are for MM and seven are for other parts of the kernel. Seven are cc:stable and eight address post-6.3 issues or were judged unsuitable for -stable backporting" * tag 'mm-hotfixes-stable-2023-03-04-13-12' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: mailmap: map Dikshita Agarwal's old address to his current one mailmap: map Vikash Garodia's old address to his current one fs/cramfs/inode.c: initialize file_ra_state fs: hfsplus: fix UAF issue in hfsplus_put_super panic: fix the panic_print NMI backtrace setting lib: parser: update documentation for match_NUMBER functions kasan, x86: don't rename memintrinsics in uninstrumented files kasan: test: fix test for new meminstrinsic instrumentation kasan: treat meminstrinsic as builtins in uninstrumented files kasan: emit different calls for instrumentable memintrinsics ocfs2: fix non-auto defrag path not working issue ocfs2: fix defrag path triggering jbd2 ASSERT mailmap: map Georgi Djakov's old Linaro address to his current one mm/hwpoison: convert TTU_IGNORE_HWPOISON to TTU_HWPOISON lib/zlib: DFLTCC deflate does not write all available bits for Z_NO_FLUSH mm/damon/paddr: fix missing folio_put() mm/mremap: fix dup_anon_vma() in vma_merge() case 4
Showing the changes to kernel (1 of 19 files). Show all
Unified · Split
| @@ -212,9 +212,6 @@ static void panic_print_sys_info(bool console_flush) · 211 unmodified lines | ||
| 212 | 212 | return; |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | − if (panic_print & PANIC_PRINT_ALL_CPU_BT) | |
| 216 | − trigger_all_cpu_backtrace(); | |
| 217 | − | |
| 218 | 215 | if (panic_print & PANIC_PRINT_TASK_INFO) |
| 219 | 216 | show_state(); |
| 220 | 217 | |
| @@ -244,6 +241,30 @@ void check_panic_on_warn(const char *origin) · 23 unmodified lines | ||
| 244 | 241 | origin, limit); |
| 245 | 242 | } |
| 246 | 243 | |
| 244 | +/* | |
| 245 | + * Helper that triggers the NMI backtrace (if set in panic_print) | |
| 246 | + * and then performs the secondary CPUs shutdown - we cannot have | |
| 247 | + * the NMI backtrace after the CPUs are off! | |
| 248 | + */ | |
| 249 | +static void panic_other_cpus_shutdown(bool crash_kexec) | |
| 250 | +{ | |
| 251 | + if (panic_print & PANIC_PRINT_ALL_CPU_BT) | |
| 252 | + trigger_all_cpu_backtrace(); | |
| 253 | + | |
| 254 | + /* | |
| 255 | + * Note that smp_send_stop() is the usual SMP shutdown function, | |
| 256 | + * which unfortunately may not be hardened to work in a panic | |
| 257 | + * situation. If we want to do crash dump after notifier calls | |
| 258 | + * and kmsg_dump, we will need architecture dependent extra | |
| 259 | + * bits in addition to stopping other CPUs, hence we rely on | |
| 260 | + * crash_smp_send_stop() for that. | |
| 261 | + */ | |
| 262 | + if (!crash_kexec) | |
| 263 | + smp_send_stop(); | |
| 264 | + else | |
| 265 | + crash_smp_send_stop(); | |
| 266 | +} | |
| 267 | + | |
| 247 | 268 | /** |
| 248 | 269 | * panic - halt the system |
| 249 | 270 | * @fmt: The text string to print |
| @@ -334,23 +355,10 @@ void panic(const char *fmt, ...) · 84 unmodified lines | ||
| 334 | 355 | * |
| 335 | 356 | * Bypass the panic_cpu check and call __crash_kexec directly. |
| 336 | 357 | */ |
| 337 | − if (!_crash_kexec_post_notifiers) { | |
| 358 | + if (!_crash_kexec_post_notifiers) | |
| 338 | 359 | __crash_kexec(NULL); |
| 339 | 360 | |
| 340 | − /* | |
| 341 | − * Note smp_send_stop is the usual smp shutdown function, which | |
| 342 | − * unfortunately means it may not be hardened to work in a | |
| 343 | − * panic situation. | |
| 344 | − */ | |
| 345 | − smp_send_stop(); | |
| 346 | − } else { | |
| 347 | − /* | |
| 348 | − * If we want to do crash dump after notifier calls and | |
| 349 | − * kmsg_dump, we will need architecture dependent extra | |
| 350 | − * works in addition to stopping other CPUs. | |
| 351 | − */ | |
| 352 | − crash_smp_send_stop(); | |
| 353 | − } | |
| 361 | + panic_other_cpus_shutdown(_crash_kexec_post_notifiers); | |
| 354 | 362 | |
| 355 | 363 | /* |
| 356 | 364 | * Run any panic handlers, including those that might need to |