From: Rabin Vincent <rabin@rab.in>
To: Jan Kara <jack@suse.cz>
Cc: Rabin Vincent <rabin.vincent@axis.com>,
viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, axboe@kernel.dk, hch@lst.de
Subject: Re: [PATCH] block: protect iterate_bdevs() against concurrent close
Date: Mon, 14 Mar 2016 18:42:58 +0100 [thread overview]
Message-ID: <20160314174258.GA16571@debian> (raw)
In-Reply-To: <20160310173727.GA19795@quack.suse.cz>
(fixed Jens' address)
On Thu, Mar 10, 2016 at 06:37:27PM +0100, Jan Kara wrote:
> On Thu 10-03-16 13:26:03, Rabin Vincent wrote:
> > If a block device is closed while iterate_bdevs() is handling it, the
> > following NULL pointer dereference occurs because bdev->b_disk is NULL
> > in bdev_get_queue(), which is called from blk_get_backing_dev_info() (in
> > turn called by the mapping_cap_writeback_dirty() call in
> > __filemap_fdatawrite_range()):
>
> Thanks for spotting the problem. The patch will fix the problem you
> found. But what prevents e.g. flusher thread from trying to writeback
> the block device inode while that gets invalidated at the same moment?
Don't the sync_block_dev() / bdev_write_inode() calls in __blkdev_put()
prevent this?
next prev parent reply other threads:[~2016-03-14 17:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-10 12:26 [PATCH] block: protect iterate_bdevs() against concurrent close Rabin Vincent
2016-03-10 17:37 ` Jan Kara
2016-03-14 17:42 ` Rabin Vincent [this message]
2016-03-15 8:23 ` Jan Kara
2016-03-15 7:51 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2016-12-01 8:18 Jan Kara
2016-12-01 10:16 ` Christoph Hellwig
2016-12-01 15:27 ` Jens Axboe
2017-01-06 0:03 ` Dan Williams
2017-01-06 0:19 ` Dan Williams
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=20160314174258.GA16571@debian \
--to=rabin@rab.in \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rabin.vincent@axis.com \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.