From: Trond Myklebust <Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>
To: Arnaud Giersch <arnaud.giersch-GANU6spQydw@public.gmane.org>
Cc: Alexander Viro
<viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>,
linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH][Resend] coredump: call vfs_getattr() to get inode attributes
Date: Tue, 28 Jun 2011 19:26:01 -0400 [thread overview]
Message-ID: <1309303561.27467.9.camel@lade.trondhjem.org> (raw)
In-Reply-To: <87tyb9r6wh.fsf-GANU6spQydw@public.gmane.org>
On Tue, 2011-06-28 at 23:19 +0200, Arnaud Giersch wrote:
> From: Arnaud Giersch <arnaud.giersch-GANU6spQydw@public.gmane.org>
>
> In do_coredump(), call vfs_getattr() to get inode attributes, and do not
> get them directly from the fields of the inode struct.
>
> Without this patch, when dumping core on an NFSv4 mount, and the i_uid
> field is not correctly filled at open time, the uid check fails, and an
> empty core dump is produced.
>
> This apparently only happens when there was no "core" file before the
> dump. If a "core" file owned by the current user is already present, it
> is correctly filled.
>
> The reason is that decode_attr_owner() in fs/nfs/nfs4xdr.c is not
> allowed to call the idmapper when it receives may_sleep = 0 (see commit
> 80e52aced138bb41b045a8595a87510f27d8d8c5, and some explanations in
> http://article.gmane.org/gmane.linux.nfs/33391).
>
> Signed-off-by: Arnaud Giersch <arnaud.giersch-GANU6spQydw@public.gmane.org>
This wants to be fixed in the NFS layer, not the VFS.
What we should do is the following:
1. Save the string versions of user@domain/group@domain in the
struct nfs4_opendata so that we can resolve them from the
process context in _nfs4_proc_open().
2. Fix nfs4_atomic_open() so that it revalidates any inode that has
the NFS_INO_INVALID_ATTR flag set.
Cheers
Trond
--
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
prev parent reply other threads:[~2011-06-28 23:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 21:19 [PATCH][Resend] coredump: call vfs_getattr() to get inode attributes Arnaud Giersch
[not found] ` <87tyb9r6wh.fsf-GANU6spQydw@public.gmane.org>
2011-06-28 23:26 ` Trond Myklebust [this message]
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=1309303561.27467.9.camel@lade.trondhjem.org \
--to=trond.myklebust-hgovqubeegtqt0dzr+alfa@public.gmane.org \
--cc=arnaud.giersch-GANU6spQydw@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-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