Thread (20 messages) flat view 20 messages, 6 authors, 2021-08-23

Re: [PATCH 8/9] block: hold a request_queue reference for the lifetime of struct gendisk

From: Ming Lei <hidden>
Date: 2021-08-20 13:44:51
Also in: linux-nvme, linux-s390, linux-scsi

On Mon, Aug 16, 2021 at 03:19:09PM +0200, Christoph Hellwig wrote:
Acquire the queue ref dropped in disk_release in __blk_alloc_disk so any
allocate gendisk always has a queue reference.
BTW, today Markus reported that request queue is released when the
disk is still live.

And looks it is triggered when running virtio-scsi hotplug from qemu
side, and the reason could be that we grab the request queue refcount
after disk is added to driver core, so there is small race window in
which the request queue is released before we grab it in __device_add_disk().

I guess this patch could fix the issue, but it is hard to verify
since it takes days to reproduce.


Thanks,
Ming
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help