From 079148b919d0c58b796f9ae98bdb53028dbcd5e7 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Tue, 30 Apr 2013 15:28:16 -0700 Subject: coredump: factor out the setting of PF_DUMPCORE Cleanup. Every linux_binfmt->core_dump() sets PF_DUMPCORE, move this into zap_threads() called by do_coredump(). Signed-off-by: Oleg Nesterov Acked-by: Mandeep Singh Baines Cc: Neil Horman Cc: "Rafael J. Wysocki" Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/binfmt_elf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/binfmt_elf.c') diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index e32344bdfab1..34a9771eaa6c 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -2092,8 +2092,7 @@ static int elf_core_dump(struct coredump_params *cprm) goto cleanup; has_dumped = 1; - current->flags |= PF_DUMPCORE; - + fs = get_fs(); set_fs(KERNEL_DS); -- cgit