lkml.org 
[lkml]   [2005]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] oom-killer sysrq-f fix
Coywolf Qi Hunt <coywolf@sosdg.org> wrote:
>
> 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;

That'll make the whole feature a no-op, won't it?

The thing needs to be moved into process context via schedule_work(). I
haven't got around to it yet.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:30    [W:0.082 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site