linux/fs/proc
Rik van Riel cbc5dde0a4 fs/proc: fix softlockup in __read_vmcore (part 2)
Since commit 5cbcb62ddd ("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: 5cbcb62ddd ("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>
2025-01-12 19:03:38 -08:00
..
array.c get rid of __get_task_comm() 2024-11-05 17:12:28 -08:00
base.c - The series "zram: optimal post-processing target selection" from 2024-11-23 09:58:07 -08:00
bootconfig.c fs/proc: Skip bootloader comment if no embedded kernel parameters 2024-04-09 23:36:18 +09:00
cmdline.c
consoles.c proc: Add nbcon support for /proc/consoles 2024-09-04 15:56:33 +02:00
cpuinfo.c
devices.c
fd.c vfs-6.13.file 2024-11-18 10:30:29 -08:00
fd.h
generic.c proc: fold kmalloc() + strcpy() into kmemdup() 2024-09-09 10:51:20 +02:00
inode.c proc: use __auto_type more 2024-09-17 01:11:20 -07:00
internal.h sysctl: move internal interfaces to const struct ctl_table 2024-10-09 13:39:11 +02:00
interrupts.c fs/procfs: Switch to irq_get_nr_irqs() 2024-10-16 21:56:59 +02:00
Kconfig crash: split vmcoreinfo exporting code out from crash_core.c 2024-02-23 17:48:22 -08:00
kcore.c vfs-6.13-rc1.fixes 2024-11-27 08:11:46 -08:00
kmsg.c
loadavg.c
Makefile kbuild: make -Woverride-init warnings more consistent 2024-03-31 11:32:26 +09:00
meminfo.c mm: zswap: modify zswap_stored_pages to be atomic_long_t 2024-11-11 00:26:42 -08:00
namespaces.c
nommu.c
page.c x86: remove PG_uncached 2024-09-03 21:15:46 -07:00
proc_net.c fs: Add kernel-doc comments to proc_create_net_data_write() 2024-03-26 09:01:18 +01:00
proc_sysctl.c sysctl: Reduce dput(child) calls in proc_sys_fill_cache() 2024-10-31 11:39:55 +01:00
proc_tty.c
root.c procfs: make freeing proc_fs_info rcu-delayed 2024-02-25 02:10:32 -05:00
self.c
softirqs.c proc/softirqs: replace seq_printf with seq_put_decimal_ull_width 2024-11-07 07:40:14 -10:00
stat.c fs/procfs: Switch to irq_get_nr_irqs() 2024-10-16 21:56:59 +02:00
task_mmu.c fs/proc/task_mmu: fix pagemap flags with PMD THP entries on 32bit 2024-12-30 17:59:08 -08:00
task_nommu.c
thread_self.c
uptime.c
util.c
version.c
vmcore.c fs/proc: fix softlockup in __read_vmcore (part 2) 2025-01-12 19:03:38 -08:00