From: Coywolf Qi Hunt <coywolf@sosdg.org>
To: linux-kernel@vger.kernel.org
Cc: james4765@cwazy.co.uk, akpm@osdl.org
Subject: [patch] oom-killer sysrq-f fix
Date: Thu, 24 Mar 2005 19:33:16 -0500 [thread overview]
Message-ID: <20050325003316.GA31352@everest.sosdg.org> (raw)
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.
next reply other threads:[~2005-03-25 0:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-25 0:33 Coywolf Qi Hunt [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050325003316.GA31352@everest.sosdg.org \
--to=coywolf@sosdg.org \
--cc=akpm@osdl.org \
--cc=coywolf@gmail.com \
--cc=james4765@cwazy.co.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®