Skip to contentSkip to conversation

UML - Turn off kmalloc always on a fatal signal

PATCH In review Jeff Dike 3 participants 4 messages May 26, 2005 – May 28, 2005 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 3/7 UML - Turn off kmalloc always on a fatal signal

We should turn off kmalloc when getting a fatal signal regardless of the mode we're in.

arch/um/kernel/main.c +1 -1
Index: linux-2.6.11/arch/um/kernel/main.c
===================================================================
@@ -71,7 +71,7 @@ static __init void do_uml_initcalls(void
 
 static void last_ditch_exit(int sig)
 {
-	CHOOSE_MODE(kmalloc_ok = 0, (void) 0);
+        kmalloc_ok = 0;
 	signal(SIGINT, SIG_DFL);
 	signal(SIGTERM, SIG_DFL);
 	signal(SIGHUP, SIG_DFL);

-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#1 lore raw
Quoted 10 lines · Jeff Dike

We should turn off kmalloc when getting a fatal signal regardless of the mode we're in.

Index: linux-2.6.11/arch/um/kernel/main.c
===================================================================

arch/um/kernel/main.c static __init void do_uml_initcalls(void · line 77

Quoted 8 lines
arch/um/kernel/main.c +1 -1
@@ -71,7 +71,7 @@ static __init void do_uml_initcalls(void
 
 static void last_ditch_exit(int sig)
 {
-	CHOOSE_MODE(kmalloc_ok = 0, (void) 0);
+        kmalloc_ok = 0;
 	signal(SIGINT, SIG_DFL);
 	signal(SIGTERM, SIG_DFL);
 	signal(SIGHUP, SIG_DFL);

This and some of the other patches are changing the formatting. The new line above is using spaces instead of a tab.

-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

author
#2 lore raw
Quoted 2 lines · Adam Heath

This and some of the other patches are changing the formatting. The new line above is using spaces instead of a tab.

On purpose - I'm making UML more CodingStyle conformant, and doing it as I'm modifying stuff anyway. The alternative is a set of whitespace patches, which will gratuitously make a barrier across which patches need to be hand-merged.

Jeff

-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#3 lore raw
Quoted 8 lines · Jeff Dike
Quoted 2 lines · Adam Heath

This and some of the other patches are changing the formatting. The new line above is using spaces instead of a tab.

On purpose - I'm making UML more CodingStyle conformant, and doing it as I'm modifying stuff anyway. The alternative is a set of whitespace patches, which will gratuitously make a barrier across which patches need to be hand-merged.

Yes but CodingStyle recommends tabs:

"Outside of comments, documentation and except in Kconfig, spaces are never used for indentation, and the above example is deliberately broken."

Signature · 24 lines
Paolo Giarrusso, aka Blaisorblade
Skype user "PaoloGiarrusso"
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade

	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel