Skip to content
Commit 05d69d95 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

xen-blkfront: sanitize the removal state machine



xen-blkfront has a weird protocol where close message from the remote
side can be delayed, and where hot removals are treated somewhat
differently from regular removals, all leading to potential NULL
pointer removals, and a del_gendisk from the block device release
method, which will deadlock. Fix this by just performing normal hot
removals even when the device is opened like all other Linux block
drivers.

Fixes: c76f48eb ("block: take bd_mutex around delete_partitions in del_gendisk")
Reported-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Tested-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Link: https://lore.kernel.org/r/20210715141711.1257293-1-hch@lst.de


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent a347c153
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment