Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1288090
| From | Al Viro <viro@ZenIV.linux.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: linux-next: build failure after merge of the vfs tree |
| Date | 2015-12-10 01:50 +0100 |
| Message-ID | <qDXAK-7eK-11@gated-at.bofh.it> (permalink) |
| References | <qDX7I-73a-17@gated-at.bofh.it> <qDXho-76y-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Dec 10, 2015 at 11:23:22AM +1100, Stephen Rothwell wrote:
> [Just adding the origefs maintainer to the cc list]
> > -static const char *pvfs2_follow_link(struct dentry *dentry, void **cookie)
> > +static const char *pvfs2_get_link(struct dentry *dentry, struct inode *inode,
> > + void **cookie)
> > {
> > - char *target = PVFS2_I(dentry->d_inode)->link_target;
Better fix is to have inode->link = PVFS2_I(dentry->d_inode)->link_target;
when we set the latter and use .get_link = simple_get_link...
Said that, there is an unpleasant bug in that area - link_target of a live
inode can be overwritten, right under the pathname resolution walking the
old contents of that thing.
copy_attributes_to_inode() is triggered by ->d_revalidate() and by ->getattr()
and it's really, really unsafe for a live inode. Just look what it does
to ->i_mode... Sure, normally a server won't return different symlink bodies
on subsequent getattr requests. As long as it's sane (and not compromised,
etc.), but relying upon that is not a good idea.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
linux-next: build failure after merge of the vfs tree Stephen Rothwell <sfr@canb.auug.org.au> - 2015-12-10 01:20 +0100
Re: linux-next: build failure after merge of the vfs tree Stephen Rothwell <sfr@canb.auug.org.au> - 2015-12-10 01:30 +0100
Re: linux-next: build failure after merge of the vfs tree Al Viro <viro@ZenIV.linux.org.uk> - 2015-12-10 01:50 +0100
Re: linux-next: build failure after merge of the vfs tree Mike Marshall <hubcap@omnibond.com> - 2015-12-10 16:50 +0100
csiph-web