diff options
Diffstat (limited to 'kernel/power/process.c')
-rw-r--r-- | kernel/power/process.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c index 0d2aeb22610..19db29f6755 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/freezer.h> | 16 | #include <linux/freezer.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/workqueue.h> | 18 | #include <linux/workqueue.h> |
19 | #include <linux/kmod.h> | ||
19 | 20 | ||
20 | /* | 21 | /* |
21 | * Timeout for stopping processes | 22 | * Timeout for stopping processes |
@@ -122,6 +123,10 @@ int freeze_processes(void) | |||
122 | { | 123 | { |
123 | int error; | 124 | int error; |
124 | 125 | ||
126 | error = __usermodehelper_disable(UMH_FREEZING); | ||
127 | if (error) | ||
128 | return error; | ||
129 | |||
125 | if (!pm_freezing) | 130 | if (!pm_freezing) |
126 | atomic_inc(&system_freezing_cnt); | 131 | atomic_inc(&system_freezing_cnt); |
127 | 132 | ||
@@ -130,6 +135,7 @@ int freeze_processes(void) | |||
130 | error = try_to_freeze_tasks(true); | 135 | error = try_to_freeze_tasks(true); |
131 | if (!error) { | 136 | if (!error) { |
132 | printk("done."); | 137 | printk("done."); |
138 | __usermodehelper_set_disable_depth(UMH_DISABLED); | ||
133 | oom_killer_disable(); | 139 | oom_killer_disable(); |
134 | } | 140 | } |
135 | printk("\n"); | 141 | printk("\n"); |
@@ -187,6 +193,8 @@ void thaw_processes(void) | |||
187 | } while_each_thread(g, p); | 193 | } while_each_thread(g, p); |
188 | read_unlock(&tasklist_lock); | 194 | read_unlock(&tasklist_lock); |
189 | 195 | ||
196 | usermodehelper_enable(); | ||
197 | |||
190 | schedule(); | 198 | schedule(); |
191 | printk("done.\n"); | 199 | printk("done.\n"); |
192 | } | 200 | } |