UML - Always disable kmalloc during shutdown
PATCH 5/8 UML - Always disable kmalloc during shutdown
kmalloc wasn't being disabled during panic. This patch ensures that, no matter how UML is exiting, it is disabled. This matters because part of the cleanup is to remove the umid file, which involves readdir, which calls malloc. This must map to libc malloc, rather than kmalloc or vmalloc.
arch/um/kernel/main.c +0 -1
@@ -69,7 +69,6 @@ static __init void do_uml_initcalls(voidstatic void last_ditch_exit (int sig) { - kmalloc_ok =0 ;signal (SIGINT ,SIG_DFL );signal (SIGTERM ,SIG_DFL );signal (SIGHUP ,SIG_DFL );
arch/um/kernel/reboot.c +4 -5
@@ -38,14 +38,14 @@ static void kill_off_processes(void)void uml_cleanup (void ) { -kill_off_processes (); + kmalloc_ok =0 ;do_uml_exitcalls (); +kill_off_processes (); }void machine_restart (char * __unused) { -do_uml_exitcalls (); -kill_off_processes (); +uml_cleanup ();CHOOSE_MODE (reboot_tt (),reboot_skas ()); }
@@ -53,8 +53,7 @@ EXPORT_SYMBOL(machine_restart);void machine_power_off (void ) { -do_uml_exitcalls (); -kill_off_processes (); +uml_cleanup ();CHOOSE_MODE (halt_tt (),halt_skas ()); }
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel