From: Trond Myklebust <Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>
To: Vitaliy Gusev <gusev.vitaliy-x4E8uuA0+mFBDgjK7y7TUQ@public.gmane.org>
Cc: linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Al Viro <viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>,
linux-fsdevel
<linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] nfs4: Fix NULL dereference at d_alloc_and_lookup()
Date: Tue, 22 Mar 2011 17:52:22 -0400 [thread overview]
Message-ID: <1300830742.9442.53.camel@lade.trondhjem.org> (raw)
In-Reply-To: <1300830025-17152-1-git-send-email-gusev.vitaliy-x4E8uuA0+mFBDgjK7y7TUQ@public.gmane.org>
On Wed, 2011-03-23 at 00:40 +0300, Vitaliy Gusev wrote:
> From: Gusev Vitaliy <gusev.vitaliy-x4E8uuA0+mFBDgjK7y7TUQ@public.gmane.org>
>
> 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-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org
www.netapp.com
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-03-22 21:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-22 21:40 [PATCH] nfs4: Fix NULL dereference at d_alloc_and_lookup() Vitaliy Gusev
[not found] ` <1300830025-17152-1-git-send-email-gusev.vitaliy-x4E8uuA0+mFBDgjK7y7TUQ@public.gmane.org>
2011-03-22 21:52 ` Trond Myklebust [this message]
[not found] ` <1300830742.9442.53.camel-SyLVLa/KEI9HwK5hSS5vWB2eb7JE58TQ@public.gmane.org>
2011-03-22 22:58 ` Vitaliy Gusev
2011-03-22 23:59 ` Trond Myklebust
[not found] ` <1300838379.22796.35.camel-SyLVLa/KEI9HwK5hSS5vWB2eb7JE58TQ@public.gmane.org>
2011-03-23 9:27 ` Vitaliy Gusev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1300830742.9442.53.camel@lade.trondhjem.org \
--to=trond.myklebust-hgovqubeegtqt0dzr+alfa@public.gmane.org \
--cc=gusev.vitaliy-x4E8uuA0+mFBDgjK7y7TUQ@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).