From e52d7487448d645616d91a5d245014463876c62c Mon Sep 17 00:00:00 2001 From: Masamichi Takagi Date: Mon, 28 Jan 2019 17:47:57 +0900 Subject: [PATCH] new_mcos_handler_info: Propagate kmalloc failure Change-Id: If484cf32cd0bf096ffd712561dd1f73046c60cd8 Fujitsu: POSTK_TEMP_FIX_64 --- executer/kernel/mcctrl/control.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/executer/kernel/mcctrl/control.c b/executer/kernel/mcctrl/control.c index 5f76ecbe..e0175d3d 100644 --- a/executer/kernel/mcctrl/control.c +++ b/executer/kernel/mcctrl/control.c @@ -330,11 +330,9 @@ struct mcos_handler_info *new_mcos_handler_info(ihk_os_t os, struct file *file) struct mcos_handler_info *info; info = kmalloc(sizeof(struct mcos_handler_info), GFP_KERNEL); -#ifdef POSTK_DEBUG_TEMP_FIX_64 /* host process is SIGKILLed fix. */ if (info == NULL) { return NULL; } -#endif /* POSTK_DEBUG_TEMP_FIX_64 */ memset(info, '\0', sizeof(struct mcos_handler_info)); info->ud = ihk_host_os_get_usrdata(os); info->file = file; @@ -402,11 +400,9 @@ static long mcexec_newprocess(ihk_os_t os, return -EFAULT; } info = new_mcos_handler_info(os, file); -#ifdef POSTK_DEBUG_TEMP_FIX_64 /* host process is SIGKILLed fix. */ if (info == NULL) { return -ENOMEM; } -#endif /* POSTK_DEBUG_TEMP_FIX_64 */ info->pid = desc.pid; ihk_os_register_release_handler(file, release_handler, info); ihk_os_set_mcos_private_data(file, info); @@ -438,12 +434,10 @@ static long mcexec_start_image(ihk_os_t os, } info = new_mcos_handler_info(os, file); -#ifdef POSTK_DEBUG_TEMP_FIX_64 /* host process is SIGKILLed fix. */ if (info == NULL) { ret = -ENOMEM; goto out; } -#endif /* POSTK_DEBUG_TEMP_FIX_64 */ info->pid = desc->pid; info->cpu = desc->cpu;