Message ID | B85A65D85D7EB246BE421B3FB0FBB59301DE31F934@dbde02.ent.ti.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Kevin Hilman |
Headers | show |
diff --git a/kernel/freezer.c b/kernel/freezer.c index bd1d42b..c28dbe8 100644 --- a/kernel/freezer.c +++ b/kernel/freezer.c @@ -9,6 +9,7 @@ #include <linux/module.h> #include <linux/syscalls.h> #include <linux/freezer.h> +#include <linux/kthread.h> /* * freezing is complete, mark current process as frozen @@ -49,7 +50,7 @@ void refrigerator(void) for (;;) { set_current_state(TASK_UNINTERRUPTIBLE); - if (!frozen(current)) + if (!frozen(current) || (!current->mm && kthread_should_stop())) break; schedule(); }