loop: be paranoid on exit and prevent new additions / removals
authorLuis Chamberlain <mcgrof@kernel.org>
Fri, 19 Jun 2020 20:47:27 +0000 (20:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:23:34 +0000 (08:23 +0200)
commit69accb89e0c2932f9c4714f9b88a5f93916c05b3
treedc3f68ed2dfd771f0b9dfcf6d48a51249ab08d5a
parent38964e03097153f7bdbddf2138f223912e7a180a
loop: be paranoid on exit and prevent new additions / removals

[ Upstream commit 200f93377220504c5e56754823e7adfea6037f1a ]

Be pedantic on removal as well and hold the mutex.
This should prevent uses of addition while we exit.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/block/loop.c