summaryrefslogtreecommitdiffstats
path: root/fs/coredump.c
diff options
context:
space:
mode:
authorRik van Riel <riel@surriel.com>2024-10-10 17:36:51 +0200
committerChristian Brauner <brauner@kernel.org>2024-10-22 11:16:58 +0200
commit0dfcb72d33c767bbe63f4a6872108515594154d9 (patch)
treefc0e50854337cda8e30088ea701af88464006bf9 /fs/coredump.c
parentmm/page-writeback.c: Fix comment of wb_domain_writeout_add() (diff)
downloadlinux-0dfcb72d33c767bbe63f4a6872108515594154d9.tar.xz
linux-0dfcb72d33c767bbe63f4a6872108515594154d9.zip
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>
Diffstat (limited to 'fs/coredump.c')
-rw-r--r--fs/coredump.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/coredump.c b/fs/coredump.c
index 45737b43dda5..d48edb37bc35 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -951,6 +951,7 @@ int dump_user_range(struct coredump_params *cprm, unsigned long start,
} else {
dump_skip(cprm, PAGE_SIZE);
}
+ cond_resched();
}
dump_page_free(dump_page);
return 1;