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 <riel@surriel.com> Link: https://lore.kernel.org/r/20241010113651.50cb0366@imladris.surriel.com Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 98f3ac9 commit 0dfcb72

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

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)