Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1357444
| From | Rabin Vincent <rabin@rab.in> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] block: protect iterate_bdevs() against concurrent close |
| Date | 2016-03-14 18:50 +0100 |
| Message-ID | <rcEMW-707-5@gated-at.bofh.it> (permalink) |
| References | <rb7T4-6WL-19@gated-at.bofh.it> <rbcJ3-1SN-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
(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?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] block: protect iterate_bdevs() against concurrent close Rabin Vincent <rabin.vincent@axis.com> - 2016-03-10 13:30 +0100
Re: [PATCH] block: protect iterate_bdevs() against concurrent close Jan Kara <jack@suse.cz> - 2016-03-10 18:40 +0100
Re: [PATCH] block: protect iterate_bdevs() against concurrent close Rabin Vincent <rabin@rab.in> - 2016-03-14 18:50 +0100
Re: [PATCH] block: protect iterate_bdevs() against concurrent close Jan Kara <jack@suse.cz> - 2016-03-15 09:30 +0100
Re: [PATCH] block: protect iterate_bdevs() against concurrent close Christoph Hellwig <hch@lst.de> - 2016-03-15 09:00 +0100
csiph-web