From: Al Viro <viro@ZenIV.linux.org.uk>
To: Miklos Szeredi <mszeredi@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 5/8] fuse: don't use ->d_time
Date: Wed, 22 Jun 2016 17:46:12 +0100 [thread overview]
Message-ID: <20160622164612.GP14480@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1466606110-24297-6-git-send-email-mszeredi@redhat.com>
On Wed, Jun 22, 2016 at 04:35:07PM +0200, Miklos Szeredi wrote:
> Store in memory pointed to by ->d_fsdata. Use ->d_allocate() to allocate
> the storage.
>
> We could cast ->d_fsdata directly on 64bit archs, but I don't think this is
> worth the extra complexity.
Now, _that_ is interesting:
> +static void fuse_dentry_release(struct dentry *dentry)
> +{
> + kfree(dentry->d_fsdata);
> +}
What happens to fuse_dentry_revalidate() called on dentry in process of
getting dropped? Unlike freeing struct dentry itself, ->d_release() is
not RCU-delayed. So you are risking dereference of ->d_fsdata after
kfree(); at the very least, it needs RCU-delayed freeing...
next prev parent reply other threads:[~2016-06-22 16:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-22 14:35 [PATCH 0/8] remove d_time from dentry Miklos Szeredi
2016-06-22 14:35 ` [PATCH 1/8] vfs: new d_allocate method Miklos Szeredi
2016-06-22 17:02 ` Al Viro
2016-06-22 20:33 ` Miklos Szeredi
2016-06-22 14:35 ` [PATCH 2/8] ceph: don't use ->d_time Miklos Szeredi
2016-06-23 6:21 ` Yan, Zheng
2016-06-28 8:09 ` Miklos Szeredi
2016-06-28 8:39 ` Yan, Zheng
2016-06-22 14:35 ` [PATCH 3/8] cifs: " Miklos Szeredi
2016-06-22 14:35 ` [PATCH 4/8] vfat: " Miklos Szeredi
2016-06-22 14:35 ` [PATCH 5/8] fuse: " Miklos Szeredi
2016-06-22 16:46 ` Al Viro [this message]
2016-06-22 14:35 ` [PATCH 6/8] nfs: " Miklos Szeredi
2016-06-22 16:48 ` Al Viro
2016-06-22 14:35 ` [PATCH 7/8] ncpfs: " Miklos Szeredi
2016-06-22 16:52 ` Al Viro
2016-06-22 14:35 ` [PATCH 8/8] vfs: remove ->d_time Miklos Szeredi
2016-06-22 21:21 ` [PATCH 0/8] remove d_time from dentry Miklos Szeredi
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=20160622164612.GP14480@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mszeredi@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.