summaryrefslogtreecommitdiffstats
path: root/kernel/umh.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/umh.c')
-rw-r--r--kernel/umh.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/umh.c b/kernel/umh.c
index b989736e8707..8945eaf4c671 100644
--- a/kernel/umh.c
+++ b/kernel/umh.c
@@ -28,6 +28,7 @@
#include <linux/async.h>
#include <linux/uaccess.h>
#include <linux/initrd.h>
+#include <linux/freezer.h>
#include <trace/events/module.h>
@@ -436,6 +437,9 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait)
if (wait == UMH_NO_WAIT) /* task has freed sub_info */
goto unlock;
+ if (wait & UMH_FREEZABLE)
+ freezer_do_not_count();
+
if (wait & UMH_KILLABLE) {
retval = wait_for_completion_killable(&done);
if (!retval)
@@ -448,6 +452,10 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait)
}
wait_for_completion(&done);
+
+ if (wait & UMH_FREEZABLE)
+ freezer_count();
+
wait_done:
retval = sub_info->retval;
out: