linux-stable/fs/pstore
Qiujun Huang 76d52b5412 pstore/zone: Use GFP_ATOMIC to allocate zone buffer
commit 99b3b83785 upstream.

There is a case found when triggering a panic_on_oom, pstore fails to dump
kmsg. Because psz_kmsg_write_record can't get the new buffer.

Handle this by using GFP_ATOMIC to allocate a buffer at lower watermark.

Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
Fixes: 335426c6dc ("pstore/zone: Provide way to skip "broken" zone for MTD devices")
Cc: WeiXiong Liao <gmpy.liaowx@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/CAJRQjofRCF7wjrYmw3D7zd5QZnwHQq+F8U-mJDJ6NZ4bddYdLA@mail.gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-12 11:58:46 +01:00
..
blk.c pstore/blk: Use "%lu" to format unsigned long 2021-11-25 09:48:42 +01:00
ftrace.c ftrace: Have the callbacks receive a struct ftrace_regs instead of pt_regs 2020-11-13 12:14:55 -05:00
inode.c pstore: Fix warning in pstore_kill_sb() 2021-02-23 09:27:20 -08:00
internal.h pstore: Move kmsg_bytes default into Kconfig 2020-12-01 12:09:17 -08:00
Kconfig pstore: Make sure CONFIG_PSTORE_PMSG selects CONFIG_RT_MUTEXES 2022-12-31 13:14:45 +01:00
Makefile pstore/blk: Introduce backend for block devices 2020-05-30 10:34:03 -07:00
platform.c pstore: Don't use semaphores in always-atomic-context code 2022-04-08 14:23:01 +02:00
pmsg.c pstore: Switch pmsg_lock to an rt_mutex to avoid priority inversion 2022-12-31 13:14:45 +01:00
ram.c pstore: Properly assign mem_type property 2023-01-12 11:58:46 +01:00
ram_core.c pstore: Avoid kcore oops by vmap()ing with VM_IOREMAP 2022-12-31 13:14:00 +01:00
zone.c pstore/zone: Use GFP_ATOMIC to allocate zone buffer 2023-01-12 11:58:46 +01:00