open: fix bug introduced in handling of invalid directory paths during an open
authorAlan Cox <alan@linux.intel.com>
Tue, 30 Aug 2016 22:10:59 +0000 (23:10 +0100)
committerAlan Cox <alan@linux.intel.com>
Tue, 30 Aug 2016 22:10:59 +0000 (23:10 +0100)
Kernel/syscall_fs3.c

index 9cdf2f9..1473f17 100644 (file)
@@ -53,7 +53,7 @@ arg_t _open(void)
                }
        } else {
                /* The n_open failed */
-               if (udata.u_error == EFAULT)
+               if (udata.u_error == EFAULT || parent == NULL)
                        goto cantopen;
 
                /* New file */