lkml.org 
[lkml]   [2012]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 6/6] staging: android/lowmemorykiller: Do not kill kernel threads
LMK should not try killing kernel threads.

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
---
drivers/staging/android/lowmemorykiller.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

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;
--
1.7.7.6

\
 
 \ /
  Last update: 2012-02-06 17:33    [W:0.133 / U:21.744 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site