Skip to contentSkip to conversation

oom fix: prevent oom from killing a process with children/sibling unkillable

PATCH In review Ankita Garg 3 participants 3 messages Mar 15, 2007 Memory management

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oom fix: prevent oom from killing a process with children/sibling unkillable

Looking at oom_kill.c, found that the intention to not kill the selected process if any of its children/siblings has OOM_DISABLE set, is not being met.

linux-2.6.20.1/mm/oom_kill.c +1 -1
Index: ankita/linux-2.6.20.1/mm/oom_kill.c
===================================================================
@@ -320,7 +320,7 @@
 	 * Don't kill the process if any threads are set to OOM_DISABLE
 	 */
 	do_each_thread(g, q) {
-		if (q->mm == mm && p->oomkilladj == OOM_DISABLE)
+		if (q->mm == mm && q->oomkilladj == OOM_DISABLE)
 			return 1;
 	} while_each_thread(g, q);
 

Regards,

Signature · 4 lines
Ankita Garg ([email protected])
Linux Technology Center
IBM India Systems & Technology Labs, 
Bangalore, India   
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Ankita Garg

Looking at oom_kill.c, found that the intention to not kill the selected process if any of its children/siblings has OOM_DISABLE set, is not being met.

Quoted 15 lines

Index: ankita/linux-2.6.20.1/mm/oom_kill.c
===================================================================

linux-2.6.20.1/mm/oom_kill.c +1 -1
@@ -320,7 +320,7 @@
 	 * Don't kill the process if any threads are set to OOM_DISABLE
 	 */
 	do_each_thread(g, q) {
-		if (q->mm == mm && p->oomkilladj == OOM_DISABLE)
+		if (q->mm == mm && q->oomkilladj == OOM_DISABLE)
 			return 1;
 	} while_each_thread(g, q);
 
Quoted 6 lines

Regards,

Signature · 4 lines
Ankita Garg ([email protected])
Linux Technology Center
IBM India Systems & Technology Labs, 
Bangalore, India   

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

Acked-by on v1 1/1
#2 lore raw
In reply to Ankita Garg
Quoted 8 lines · Ankita Garg

Looking at oom_kill.c, found that the intention to not kill the selected process if any of its children/siblings has OOM_DISABLE set, is not being met.

Index: ankita/linux-2.6.20.1/mm/oom_kill.c
===================================================================

linux-2.6.20.1/mm/oom_kill.c line 325

Quoted 7 lines
linux-2.6.20.1/mm/oom_kill.c +1 -1
@@ -320,7 +320,7 @@
 	 * Don't kill the process if any threads are set to OOM_DISABLE
 	 */
 	do_each_thread(g, q) {
-		if (q->mm == mm && p->oomkilladj == OOM_DISABLE)
+		if (q->mm == mm && q->oomkilladj == OOM_DISABLE)
 			return 1;
 	} while_each_thread(g, q);

-- wli

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>