]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - block/blk-flush.c
blkdev: check for valid request queue before issuing flush
authorDave Chinner <dchinner@redhat.com>
Tue, 13 Jul 2010 07:50:50 +0000 (17:50 +1000)
committerJens Axboe <jaxboe@fusionio.com>
Sat, 7 Aug 2010 16:26:29 +0000 (18:26 +0200)
commitf10d9f617a65905c556c3b37c9b9646ae7d04ed7
tree0e1d1a28578e8c1b2115b8486add3b235f7e3619
parent2669b19fa4debcdd6a660ace1a124c0900f113e6
blkdev: check for valid request queue before issuing flush

Issuing a blkdev_issue_flush() on an unconfigured loop device causes a panic as
q->make_request_fn is not configured. This can occur when trying to mount the
unconfigured loop device as an XFS filesystem. There are no guards that catch
the bio before the request function is called because we don't add a payload to
the bio. Instead, manually check this case as soon as we have a pointer to the
queue to flush.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/blk-barrier.c