]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/hugetlbfs/inode.c
hugetlbfs: add NULL check in hugetlb_zero_setup()
[mirror_ubuntu-artful-kernel.git] / fs / hugetlbfs / inode.c
index 842a4ed4052d1d2039684b2bd0fefefa4bb70f32..98959b87cdf8f1f674c668673b10bf110a7bf653 100644 (file)
@@ -747,6 +747,9 @@ struct file *hugetlb_zero_setup(size_t size)
        char buf[16];
        static atomic_t counter;
 
+       if (!hugetlbfs_vfsmount)
+               return ERR_PTR(-ENOENT);
+
        if (!can_do_hugetlb_shm())
                return ERR_PTR(-EPERM);