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: firefly_0821_release~3680^2~3347^2~176^2~157 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9823ec9ded836ee7ca4fe5ab7964b9cdc8af010c;p=firefly-linux-kernel-4.4.55.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;