From 38c08a6663a34c94fc4cbcbc7c5d7017b63717bf Mon Sep 17 00:00:00 2001 From: Ken Sato Date: Sat, 18 Aug 2018 10:06:50 +0900 Subject: [PATCH] coredump: Add O_TRUNC to flags opening corefile Fujitsu: POSTK_DEBUG_TEMP_FIX_59 Change-Id: I36c89fa894dfc0cdd170781e8ca4aab6149d4928 --- executer/kernel/mcctrl/syscall.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/executer/kernel/mcctrl/syscall.c b/executer/kernel/mcctrl/syscall.c index dcb268a8..fe077c67 100644 --- a/executer/kernel/mcctrl/syscall.c +++ b/executer/kernel/mcctrl/syscall.c @@ -2174,11 +2174,7 @@ static int writecore(ihk_os_t os, unsigned long rcoretable, int chunks) { * dump routine of the Linux kernel in linux/fs/exec.c. * So we have a legitimate reason to do this. */ -#ifdef POSTK_DEBUG_TEMP_FIX_59 /* corefile open flag add O_TRUNC */ file = filp_open("core", O_CREAT | O_RDWR | O_LARGEFILE | O_TRUNC, 0600); -#else /* POSTK_DEBUG_TEMP_FIX_59 */ - file = filp_open("core", O_CREAT | O_RDWR | O_LARGEFILE, 0600); -#endif /* POSTK_DEBUG_TEMP_FIX_59 */ if (IS_ERR(file) || !file->f_op) { dprintk("cannot open core file\n"); error = PTR_ERR(file);