cc +linux-block
The disk->queue_kobj is initialized in add_disk() and is uninitialized
in del_disk(). And it seems that blk_unregister_queue() in del_disk()
doesn't uninitialize the queue_kobj completely, because it doesn't
expect the queue_kobj will be added again. I think the right place to
fix the problem is blk_unregister_queue(). How about just memset the
queue_kobj as zero after deleting the queue_kobj in blk_unregister_queue() ?