Re: fs: gpf in simple_setattr

From: Dave Jones
Date: Wed Mar 26 2014 - 01:54:56 EST


On Tue, Mar 25, 2014 at 10:12:29PM +0100, Jan Kara wrote:

> This fixes an oops triggered by trinity when it tried mounting
> anon_inodefs which overwrote anon_inode_inode pointer while other CPU
> has been in anon_inode_getfile() between ihold() and d_instantiate().
> Thus effectively creating dentry pointing to an inode without holding a
> reference to it.

<raises eyebrows>

Sasha, do you have changes to trinity's syscall/mount.c ?
It's kind of miraculous we managed to get the type arg right
there, because right now we're just passing a random address as an arg.
The only way that could work is if we randomly managed to do an allocation,
and then a seek & read from /proc/filesystems to that buffer. If you're
lucky enough to get all those conditions right from rand() calls, you should
probably give up on kernel hacking and buy some powerball tickets.

We should add some code to make that only return strings from /proc/filesystems,
which makes me wonder if you already did that..

Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/