All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] oom-killer sysrq-f fix
@ 2005-03-25  0:33 Coywolf Qi Hunt
  2005-03-25  0:44 ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Coywolf Qi Hunt @ 2005-03-25  0:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: james4765, akpm


Hello,

akpm, I saw you noticed it,
http://www.ussg.iu.edu/hypermail/linux/kernel/0412.0/0424.html

Jim Nelson, this patch is to your post: 2.6.11-rc2-mm2 - kernel panic with SysRq-f 

Recent make-sysrq-f-call-oom_kill.patch calls oom-killer in interrupt context,
thus results into panic. This patch fixes out_of_memory() to avoid schedule
when in interrupt context.

	Coywolf


Signed-off-by: Coywolf Qi Hunt <coywolf@lovecn.org>

diff -pruN 2.6.12-rc1-mm2/mm/oom_kill.c 2.6.12-rc1-mm2-cy/mm/oom_kill.c
--- 2.6.12-rc1-mm2/mm/oom_kill.c	2005-03-03 17:12:18.000000000 +0800
+++ 2.6.12-rc1-mm2-cy/mm/oom_kill.c	2005-03-25 08:07:19.000000000 +0800
@@ -20,6 +20,7 @@
 #include <linux/swap.h>
 #include <linux/timex.h>
 #include <linux/jiffies.h>
+#include <linux/hardirq.h>
 
 /* #define DEBUG */
 
@@ -283,6 +284,9 @@ retry:
 	if (mm)
 		mmput(mm);
 
+	if (in_interrupt())
+		return;
+
 	/*
 	 * Give "p" a good chance of killing itself before we
 	 * retry to allocate memory.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-03-25 10:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-25  0:33 [patch] oom-killer sysrq-f fix Coywolf Qi Hunt
2005-03-25  0:44 ` Andrew Morton
2005-03-25  1:04   ` Coywolf Qi Hunt
2005-03-25  1:21     ` Andrew Morton
2005-03-25  7:36       ` Coywolf Qi Hunt
2005-03-25  9:59         ` Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.