staging: android/lowmemorykiller: Do not kill kernel threads
authorAnton Vorontsov <anton.vorontsov@linaro.org>
Mon, 6 Feb 2012 16:30:01 +0000 (20:30 +0400)
committerGrazvydas Ignotas <notasas@gmail.com>
Wed, 25 Apr 2012 22:24:23 +0000 (01:24 +0300)
LMK should not try killing kernel threads.

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/lowmemorykiller.c

index 0a10358..8b8a537 100644 (file)
@@ -140,6 +140,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;