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: MMI-PSA29.97-13-9~17268^2~176^2~157 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9823ec9ded836ee7ca4fe5ab7964b9cdc8af010c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.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 6e800d35ebda..ae38c39a1525 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;