[heads-up] mknod() broken on nfs4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	Try mknod(path, 0777, 0); with path leading into nfs4.  It
leads to call of nfs_open_create(), with nd->intent.open.file being
uninitialized.  Note that LOOKUP_CREATE is set and so's LOOKUP_EXCL,
but LOOKUP_OPEN isn't.  So nfs_atomic_lookup() falls through to
nfs_lookup(), which sees that we are doing exclusive create and just
does d_instantiate(dentry, NULL) and do nothing else.  And then
we hit ->create()...

	Results are ugly - random errors (often -EINVAL or -ENOENT)
and possibility of memory corruption if we manage to generate a request
that won't fail on server.  

	The really interesting question is what should we pass in
NFS_PROTO(dir)->create() in open_flags.  I suspect that you are
checking the wrong flag there (LOOKUP_CREATE instead of LOOKUP_OPEN),
but I'm not sure what *should* be passed when LOOKUP_OPEN is not
there...
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux