[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/2] virtio-scsi: Fix acquire/release in data
From: |
Ed Swierk |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/2] virtio-scsi: Fix acquire/release in dataplane handlers |
Date: |
Wed, 15 Mar 2017 10:25:26 -0700 |
On Tue, Mar 14, 2017 at 8:36 AM, Fam Zheng <address@hidden> wrote:
> After the AioContext lock push down, there is a race between
> virtio_scsi_dataplane_start and those "assert(s->ctx &&
> s->dataplane_started)", because the latter doesn't isn't wrapped in
> aio_context_acquire.
>
> Reproducer is simply booting a Fedora guest with an empty
> virtio-scsi-dataplane controller:
>
> qemu-system-x86_64 \
> -drive
> if=none,id=root,format=raw,file=Fedora-Cloud-Base-25-1.3.x86_64.raw \
> -device virtio-scsi \
> -device scsi-disk,drive=root,bootindex=1 \
> -object iothread,id=io \
> -device virtio-scsi-pci,iothread=io \
> -net user,hostfwd=tcp::10022-:22 -net nic,model=virtio -m 2048 \
> --enable-kvm
>
> Fix this by moving acquire/release pairs from virtio_scsi_handle_*_vq to
> their callers - and wrap the broken assertions in.
>
> Signed-off-by: Fam Zheng <address@hidden>
Verified this fixes the assertion failure on 2.9.0-rc0.
Tested-by: Ed Swierk <address@hidden>