[Qemu-devel] [PATCH 0/2] virtio-scsi: fix hotplug ->reset() vs event race

Stefan Hajnoczi posted 2 patches 7 years, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180710155037.16834-1-stefanha@redhat.com
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
There is a newer version of this series
include/hw/hotplug.h  | 12 ++++++++++++
hw/core/hotplug.c     | 11 +++++++++++
hw/core/qdev.c        |  7 +++++++
hw/scsi/virtio-scsi.c | 11 ++++++++++-
4 files changed, 40 insertions(+), 1 deletion(-)
[Qemu-devel] [PATCH 0/2] virtio-scsi: fix hotplug ->reset() vs event race
Posted by Stefan Hajnoczi 7 years, 3 months ago
The virtio-scsi command virtqueues run during hotplug.  This creates the
possibility of race conditions since the guest can submit commands while the
monitor is performing hotplug.

See Patch 2 for a fix for the ->reset() vs event race condition that Zhengui Li
encountered.

Zhengui Li: Sorry it took me so long to look into this.  Please let me know if
this fixes the issue you are seeing.  Thanks!

Stefan Hajnoczi (2):
  qdev: add HotplugHandler->post_plug() callback
  virtio-scsi: fix hotplug ->reset() vs event race

 include/hw/hotplug.h  | 12 ++++++++++++
 hw/core/hotplug.c     | 11 +++++++++++
 hw/core/qdev.c        |  7 +++++++
 hw/scsi/virtio-scsi.c | 11 ++++++++++-
 4 files changed, 40 insertions(+), 1 deletion(-)

-- 
2.17.1


Re: [Qemu-devel] [PATCH 0/2] virtio-scsi: fix hotplug ->reset() vs event race
Posted by Fam Zheng 7 years, 3 months ago
On Tue, 07/10 16:50, Stefan Hajnoczi wrote:
> The virtio-scsi command virtqueues run during hotplug.  This creates the
> possibility of race conditions since the guest can submit commands while the
> monitor is performing hotplug.
> 
> See Patch 2 for a fix for the ->reset() vs event race condition that Zhengui Li
> encountered.
> 
> Zhengui Li: Sorry it took me so long to look into this.  Please let me know if
> this fixes the issue you are seeing.  Thanks!
> 
> Stefan Hajnoczi (2):
>   qdev: add HotplugHandler->post_plug() callback
>   virtio-scsi: fix hotplug ->reset() vs event race
> 
>  include/hw/hotplug.h  | 12 ++++++++++++
>  hw/core/hotplug.c     | 11 +++++++++++
>  hw/core/qdev.c        |  7 +++++++
>  hw/scsi/virtio-scsi.c | 11 ++++++++++-
>  4 files changed, 40 insertions(+), 1 deletion(-)
> 
> -- 
> 2.17.1

Reviewed-by: Fam Zheng <famz@redhat.com>


Re: [Qemu-devel] [PATCH 0/2] virtio-scsi: fix hotplug ->reset() vs event race
Posted by l00284672 7 years, 3 months ago
Ok, I will test your patch soon.


On 2018/7/10 23:50, Stefan Hajnoczi wrote:
> The virtio-scsi command virtqueues run during hotplug.  This creates the
> possibility of race conditions since the guest can submit commands while the
> monitor is performing hotplug.
>
> See Patch 2 for a fix for the ->reset() vs event race condition that Zhengui Li
> encountered.
>
> Zhengui Li: Sorry it took me so long to look into this.  Please let me know if
> this fixes the issue you are seeing.  Thanks!
>
> Stefan Hajnoczi (2):
>    qdev: add HotplugHandler->post_plug() callback
>    virtio-scsi: fix hotplug ->reset() vs event race
>
>   include/hw/hotplug.h  | 12 ++++++++++++
>   hw/core/hotplug.c     | 11 +++++++++++
>   hw/core/qdev.c        |  7 +++++++
>   hw/scsi/virtio-scsi.c | 11 ++++++++++-
>   4 files changed, 40 insertions(+), 1 deletion(-)
>