blk-iocost: ioc_pd_free() shouldn't assume irq disabled
authorTejun Heo <tj@kernel.org>
Tue, 1 Sep 2020 18:52:31 +0000 (14:52 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:14:30 +0000 (19:14 +0200)
commit70d22582c3eb6d50c30574019777d546fbd5cc81
tree4d768ef643cecf2e0f78e5d23917a82f65f7f036
parent57fd9f8eb60389e645256b17fce50b29b0f869ee
blk-iocost: ioc_pd_free() shouldn't assume irq disabled

commit 5aeac7c4b16069aae49005f0a8d4526baa83341b upstream.

ioc_pd_free() grabs irq-safe ioc->lock without ensuring that irq is disabled
when it can be called with irq disabled or enabled. This has a small chance
of causing A-A deadlocks and triggers lockdep splats. Use irqsave operations
instead.

Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost")
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/blk-iocost.c