usermodehelper: check subprocess_info->path != NULL
[platform/adaptation/renesas_rcar/renesas_kernel.git] / kernel / kmod.c
index 1296e72..8241906 100644 (file)
@@ -569,6 +569,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;