usermodehelper: check subprocess_info->path != NULL
[pandora-kernel.git] / kernel / kmod.c
index d6fe08a..a16dac1 100644 (file)
@@ -467,6 +467,11 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info,
        int retval = 0;
 
        helper_lock();
+       if (!sub_info->path) {
+               retval = -EINVAL;
+               goto out;
+       }
+
        if (sub_info->path[0] == '\0')
                goto out;