Skip to content

Commit 5cbcb62

Browse files
rikvanrielakpm00
authored andcommitted
fs/proc: fix softlockup in __read_vmcore
While taking a kernel core dump with makedumpfile on a larger system, softlockup messages often appear. While softlockup warnings can be harmless, they can also interfere with things like RCU freeing memory, which can be problematic when the kdump kexec image is configured with as little memory as possible. Avoid the softlockup, and give things like work items and RCU a chance to do their thing during __read_vmcore by adding a cond_resched. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Rik van Riel <[email protected]> Acked-by: Baoquan He <[email protected]> Cc: Dave Young <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 0a73eac commit 5cbcb62

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/proc/vmcore.c

+2
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,8 @@ static ssize_t __read_vmcore(struct iov_iter *iter, loff_t *fpos)
383383
/* leave now if filled buffer already */
384384
if (!iov_iter_count(iter))
385385
return acc;
386+
387+
cond_resched();
386388
}
387389

388390
list_for_each_entry(m, &vmcore_list, list) {

0 commit comments

Comments
 (0)