Re: fs: gpf in simple_setattr

From: Jan Kara
Date: Wed Mar 26 2014 - 01:34:54 EST


On Tue 25-03-14 17:41:59, Linus Torvalds wrote:
> On Tue, Mar 25, 2014 at 2:12 PM, Jan Kara <jack@xxxxxxx> wrote:
> >
> > Can you try whether the following patch fixes the issue for you?
>
> Good catch, Honza.
>
> I hate how fragile that code ends up being and would love to see that
> "anon_inode_inode" allocation and assignment just once in
> anon_inode_init(), but considering that it wants the superblock
> pointer, I suspect it's not cleanly doable. Oh well. Your patch looks
> like it should make the issue moot, I just dread this happening again
> due to the layout of the code.
Well, I think it could be done relatively cleanly... How about the
attached patch (it boots for me)?

Honza
--
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR