[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100916221416.GA28059@quack.suse.cz>
Date: Fri, 17 Sep 2010 00:14:16 +0200
From: Jan Kara <jack@...e.cz>
To: Jens Axboe <axboe@...nel.dk>
Cc: Jan Kara <jack@...e.cz>, linux-kernel@...r.kernel.org,
tj@...nel.org
Subject: Re: [PATCH] block: Fix race during disk initialization
On Thu 16-09-10 20:33:39, Jens Axboe wrote:
> On 2010-09-16 20:20, Jan Kara wrote:
> > When a new disk is being discovered, add_disk() first ties the bdev to gendisk
> > (via register_disk()->blkdev_get()) and only after that calls
> > bdi_register_bdev(). Because register_disk() also creates disk's kobject, it
> > can happen that userspace manages to open and modify the device's data (or
> > inode) before its BDI is properly initialized leading to a warning in
> > __mark_inode_dirty().
> >
> > Fix the problem by registering BDI early enough.
> >
> > This patch addresses https://bugzilla.kernel.org/show_bug.cgi?id=16312
> >
> > Reported-by: Larry Finger <Larry.Finger@...inger.net>
> > Signed-off-by: Jan Kara <jack@...e.cz>
> > ---
> > block/genhd.c | 6 ++++--
> > 1 files changed, 4 insertions(+), 2 deletions(-)
> >
> > Jens, would you consider merging this fix? The kernel boots with it but
> > I'm not too familiar with this area of kernel so there can be something subtle
> > I've missed. So please review. Thanks.
>
> It looks sane. How about we add it to the .37 lineup and mark it for
> stable backport?
OK with me. Thanks.
Honza
--
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists