Re: [PATCH] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-04-24 Thread Stefan Hajnoczi
On Thu, Apr 23, 2020 at 07:13:38AM -0700, Christoph Hellwig wrote: > On Thu, Apr 23, 2020 at 01:37:17PM +0100, Stefan Hajnoczi wrote: > > A virtio_blk block device can still be referenced after hot unplug by > > userspace processes that hold the file descriptor. In this case > > virtblk_getgeo()

Re: [PATCH] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-04-24 Thread Stefano Garzarella
On Thu, Apr 23, 2020 at 01:37:17PM +0100, Stefan Hajnoczi wrote: > A virtio_blk block device can still be referenced after hot unplug by > userspace processes that hold the file descriptor. In this case > virtblk_getgeo() can be invoked after virtblk_remove() was called. For > example, a program

Re: [PATCH] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-04-23 Thread Christoph Hellwig
On Thu, Apr 23, 2020 at 01:37:17PM +0100, Stefan Hajnoczi wrote: > A virtio_blk block device can still be referenced after hot unplug by > userspace processes that hold the file descriptor. In this case > virtblk_getgeo() can be invoked after virtblk_remove() was called. For > example, a program

Re: [PATCH] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-04-23 Thread Michael S. Tsirkin
On Thu, Apr 23, 2020 at 01:37:17PM +0100, Stefan Hajnoczi wrote: > A virtio_blk block device can still be referenced after hot unplug by > userspace processes that hold the file descriptor. In this case > virtblk_getgeo() can be invoked after virtblk_remove() was called. For > example, a program

[PATCH] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-04-23 Thread Stefan Hajnoczi
A virtio_blk block device can still be referenced after hot unplug by userspace processes that hold the file descriptor. In this case virtblk_getgeo() can be invoked after virtblk_remove() was called. For example, a program that has /dev/vdb open can call ioctl(HDIO_GETGEO) after hot unplug.