diff --git a/kernel/kmod.c b/kernel/kmod.c index 05698a7415fe..f2490e1dd51f 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -541,6 +541,11 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait) int retval = 0; helper_lock(); + if (!sub_info->path) { + retval = -EINVAL; + goto out; + } + if (sub_info->path[0] == '\0') goto out;