lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080807131742.GC27783@redhat.com>
Date:	Thu, 7 Aug 2008 09:17:42 -0400
From:	Vivek Goyal <vgoyal@...hat.com>
To:	Huang Ying <ying.huang@...el.com>
Cc:	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Pavel Machek <pavel@....cz>, nigel@...el.suspend2.net,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	Andrew Morton <akpm@...ux-foundation.org>, mingo@...e.hu,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Kexec Mailing List <kexec@...ts.infradead.org>
Subject: Re: [PATCH 3/6] kexec jump: remove duplication of
	kexec_restart_prepare()

On Thu, Aug 07, 2008 at 05:05:28PM +0800, Huang Ying wrote:
> Call kernel_restart_prepare() in kernel_kexec() instead of duplicating
> the code.
> 
> Signed-off-by: Huang Ying <ying.huang@...el.com>
> 
> ---
>  include/linux/reboot.h |    1 +
>  kernel/kexec.c         |    6 +-----
>  kernel/sys.c           |    2 +-
>  3 files changed, 3 insertions(+), 6 deletions(-)
> 
> --- a/include/linux/reboot.h
> +++ b/include/linux/reboot.h
> @@ -59,6 +59,7 @@ extern void machine_crash_shutdown(struc
>   * Architecture independent implemenations of sys_reboot commands.
>   */
>  
> +extern void kernel_restart_prepare(char *cmd);
>  extern void kernel_restart(char *cmd);
>  extern void kernel_halt(void);
>  extern void kernel_power_off(void);
> --- a/kernel/sys.c
> +++ b/kernel/sys.c
> @@ -274,7 +274,7 @@ void emergency_restart(void)
>  }
>  EXPORT_SYMBOL_GPL(emergency_restart);
>  
> -static void kernel_restart_prepare(char *cmd)
> +void kernel_restart_prepare(char *cmd)
>  {
>  	blocking_notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd);
>  	system_state = SYSTEM_RESTART;
> --- a/kernel/kexec.c
> +++ b/kernel/kexec.c
> @@ -1472,11 +1472,7 @@ int kernel_kexec(void)
>  	} else
>  #endif
>  	{
> -		blocking_notifier_call_chain(&reboot_notifier_list,
> -					     SYS_RESTART, NULL);
> -		system_state = SYSTEM_RESTART;
> -		device_shutdown();
> -		sysdev_shutdown();
> +		kernel_restart_prepare(NULL);
>  		printk(KERN_EMERG "Starting new kernel\n");
>  		machine_shutdown();
>  	}

Looks good to me. 

Acked-by: Vivek Goyal <vgoyal@...hat.com>

Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ