Centos-kernel-stream-9/fs/proc
Baoquan He 640f5e09e0 fs/proc: fix softlockup in __read_vmcore (part 2)
JIRA: https://issues.redhat.com/browse/RHEL-79112
CVE: CVE-2025-21694

Upstream Status: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

commit cbc5dde0a461240046e8a41c43d7c3b76d5db952
Author: Rik van Riel <riel@surriel.com>
Date:   Fri Jan 10 10:28:21 2025 -0500

    fs/proc: fix softlockup in __read_vmcore (part 2)

    Since commit 5cbcb62dddf5 ("fs/proc: fix softlockup in __read_vmcore") the
    number of softlockups in __read_vmcore at kdump time have gone down, but
    they still happen sometimes.

    In a memory constrained environment like the kdump image, a softlockup is
    not just a harmless message, but it can interfere with things like RCU
    freeing memory, causing the crashdump to get stuck.

    The second loop in __read_vmcore has a lot more opportunities for natural
    sleep points, like scheduling out while waiting for a data write to
    happen, but apparently that is not always enough.

    Add a cond_resched() to the second loop in __read_vmcore to (hopefully)
    get rid of the softlockups.

    Link: https://lkml.kernel.org/r/20250110102821.2a37581b@fangorn
    Fixes: 5cbcb62dddf5 ("fs/proc: fix softlockup in __read_vmcore")
    Signed-off-by: Rik van Riel <riel@surriel.com>
    Reported-by: Breno Leitao <leitao@debian.org>
    Cc: Baoquan He <bhe@redhat.com>
    Cc: Dave Young <dyoung@redhat.com>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Signed-off-by: Baoquan He <bhe@redhat.com>
2025-02-27 11:24:06 +08:00
..
Kconfig crash: split vmcoreinfo exporting code out from crash_core.c 2024-12-23 09:35:35 +08:00
Makefile
array.c ucounts: Split rlimit and ucount values and max values 2024-12-20 15:31:08 +00:00
base.c Merge: fs: backport mnt_idmap type 2024-11-11 08:26:30 +00:00
bootconfig.c
cmdline.c
consoles.c proc: Add nbcon support for /proc/consoles 2024-05-09 11:26:27 -04:00
cpuinfo.c x86/aperfmperf: Replace aperfmperf_get_khz() 2024-03-20 09:42:34 -04:00
devices.c
fd.c fs: port ->permission() to pass mnt_idmap 2024-10-16 10:45:20 +08:00
fd.h fs: port ->permission() to pass mnt_idmap 2024-10-16 10:45:20 +08:00
generic.c fs: port ->getattr() to pass mnt_idmap 2024-10-16 09:37:45 +08:00
inode.c tty, proc, kernfs, random: Use copy_splice_read() 2024-09-05 20:35:54 -04:00
internal.h fs: port ->getattr() to pass mnt_idmap 2024-10-16 09:37:45 +08:00
interrupts.c
kcore.c crash: split vmcoreinfo exporting code out from crash_core.c 2024-12-23 09:35:35 +08:00
kmsg.c
loadavg.c
meminfo.c mm: memtest: convert to memtest_report_meminfo() 2024-10-01 11:21:31 -04:00
namespaces.c
nommu.c
page.c mm: support page_mapcount() on page_has_type() pages 2024-12-09 12:24:52 -05:00
proc_net.c fs: port ->getattr() to pass mnt_idmap 2024-10-16 09:37:45 +08:00
proc_sysctl.c fs: port ->permission() to pass mnt_idmap 2024-10-16 10:45:20 +08:00
proc_tty.c
root.c fs: port ->getattr() to pass mnt_idmap 2024-10-16 09:37:45 +08:00
self.c
softirqs.c
stat.c
task_mmu.c mempolicy: alloc_pages_mpol() for NUMA policy without vma 2024-12-09 12:23:16 -05:00
task_nommu.c mm: factor out VMA stack and heap checks 2024-10-01 11:20:09 -04:00
thread_self.c
uptime.c
util.c
version.c
vmcore.c fs/proc: fix softlockup in __read_vmcore (part 2) 2025-02-27 11:24:06 +08:00