]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
block: Fix race triggered by blk_set_queue_dying()
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 16 Aug 2016 23:48:36 +0000 (16:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2016 06:20:26 +0000 (08:20 +0200)
commit014146e4370fc132314f5015d74b940d1a4bf930
treea683794185004014faf4f06e0d69ad1e8a45791c
parentc9274d891869880648c4ee9365df3ecc7ba2e285
block: Fix race triggered by blk_set_queue_dying()

commit 1b856086813be9371929b6cc62045f9fd470f5a0 upstream.

blk_set_queue_dying() can be called while another thread is
submitting I/O or changing queue flags, e.g. through dm_stop_queue().
Hence protect the QUEUE_FLAG_DYING flag change with locking.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/blk-core.c