Skip to content

Commit 0dfcb72

Browse files
rikvanrielbrauner
authored andcommitted
coredump: add cond_resched() to dump_user_range
The loop between elf_core_dump() and dump_user_range() can run for so long that the system shows softlockup messages, with side effects like workqueues and RCU getting stuck on the core dumping CPU. Add a cond_resched() in dump_user_range() to avoid that softlockup. Signed-off-by: Rik van Riel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent 98f3ac9 commit 0dfcb72

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/coredump.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ int dump_user_range(struct coredump_params *cprm, unsigned long start,
951951
} else {
952952
dump_skip(cprm, PAGE_SIZE);
953953
}
954+
cond_resched();
954955
}
955956
dump_page_free(dump_page);
956957
return 1;

0 commit comments

Comments
 (0)