From: Jan Kara <jack@suse.cz>
To: Jens Axboe <axboe@kernel.dk>
Cc: Jan Kara <jack@suse.cz>, linux-kernel@vger.kernel.org, tj@kernel.org
Subject: Re: [PATCH] block: Fix race during disk initialization
Date: Fri, 17 Sep 2010 00:14:16 +0200 [thread overview]
Message-ID: <20100916221416.GA28059@quack.suse.cz> (raw)
In-Reply-To: <4C926303.9090206@kernel.dk>
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@lwfinger.net>
> > Signed-off-by: Jan Kara <jack@suse.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@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2010-09-16 22:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-16 18:20 [PATCH] block: Fix race during disk initialization Jan Kara
2010-09-16 18:33 ` Jens Axboe
2010-09-16 22:14 ` Jan Kara [this message]
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=20100916221416.GA28059@quack.suse.cz \
--to=jack@suse.cz \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox