diff options
| author | Stefan Hajnoczi | 2016-11-16 21:17:32 +0100 |
|---|---|---|
| committer | Michael S. Tsirkin | 2016-11-18 16:14:10 +0100 |
| commit | 600f5ce356b44d8fa5a611ff6b034eb95ecf04e7 (patch) | |
| tree | 194fa4413e7dded3bc187ff5a9e1ae7e31822182 /include/libdecnumber | |
| parent | docs: add PCIe devices placement guidelines (diff) | |
| download | qemu-600f5ce356b44d8fa5a611ff6b034eb95ecf04e7.tar.gz qemu-600f5ce356b44d8fa5a611ff6b034eb95ecf04e7.tar.xz qemu-600f5ce356b44d8fa5a611ff6b034eb95ecf04e7.zip | |
virtio-crypto: fix virtio_queue_set_notification() race
We must check for new virtqueue buffers after re-enabling notifications.
This prevents the race condition where the guest added buffers just
after we stopped popping the virtqueue but before we re-enabled
notifications.
I think the virtio-crypto code was based on virtio-net but this crucial
detail was missed. virtio-net does not have the race condition because
it processes the virtqueue one more time after re-enabling
notifications.
Cc: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Diffstat (limited to 'include/libdecnumber')
0 files changed, 0 insertions, 0 deletions
