Re: [PATCH] nfs4: Fix NULL dereference at d_alloc_and_lookup()

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

 



On Wed, 2011-03-23 at 00:40 +0300, Vitaliy Gusev wrote:
> From: Gusev Vitaliy <gusev.vitaliy@xxxxxxxxxxx>
> 
> d_alloc_and_lookup() calls i_op->lookup method due to
> rootfh changes his fsid.
>
> During mount i_op of NFS root inode is set to
> nfs_mountpoint_inode_operations, if rpc_ops->getroot()
> and rpc_ops->getattr() return different fsid.

That is a server bug! Why are you trying to "fix" that on the client
instead of telling the user that their server deserves to be burned
behind the shed?

>  
> +	if (fattr->valid & NFS_ATTR_FATTR_FSID &&
> +	    !nfs_fsid_equal(&server->fsid, &fattr->fsid))
> +		memcpy(&server->fsid, &fattr->fsid, sizeof(server->fsid));

No. add a printk() to the effect that the server is insane, return -EIO
and we're done...

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com

--
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