diff --git a/drivers/android/simple_lmk.c b/drivers/android/simple_lmk.c index 3ed9182c1d42..0ed723bc0043 100644 --- a/drivers/android/simple_lmk.c +++ b/drivers/android/simple_lmk.c @@ -5,6 +5,7 @@ #define pr_fmt(fmt) "simple_lmk: " fmt +#include #include #include #include @@ -270,9 +271,10 @@ static int simple_lmk_reclaim_thread(void *data) }; sched_setscheduler_nocheck(current, SCHED_FIFO, &sched_max_rt_prio); + set_freezable(); while (1) { - wait_event(oom_waitq, atomic_read(&needs_reclaim)); + wait_event_freezable(oom_waitq, atomic_read(&needs_reclaim)); scan_and_kill(); atomic_set_release(&needs_reclaim, 0); }