From: Anton Vorontsov Date: Mon, 6 Feb 2012 16:30:01 +0000 (+0400) Subject: staging: android/lowmemorykiller: Do not kill kernel threads X-Git-Tag: v3.4-rc1~186^2~176^2~157 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9823ec9ded836ee7ca4fe5ab7964b9cdc8af010c;p=platform%2Fkernel%2Flinux-3.10.git staging: android/lowmemorykiller: Do not kill kernel threads LMK should not try killing kernel threads. Suggested-by: Oleg Nesterov Reviewed-by: Oleg Nesterov Signed-off-by: Anton Vorontsov Acked-by: KOSAKI Motohiro Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c index 6e800d3..ae38c39 100644 --- a/drivers/staging/android/lowmemorykiller.c +++ b/drivers/staging/android/lowmemorykiller.c @@ -138,6 +138,9 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc) struct task_struct *p; int oom_adj; + if (tsk->flags & PF_KTHREAD) + continue; + p = find_lock_task_mm(tsk); if (!p) continue;