Skip to content
  • Cornelia Huck's avatar
    dataplane: Fix startup race. · 8caf907f
    Cornelia Huck authored
    
    
    Avoid trying to setup dataplane again if dataplane setup is already in
    progress. This may happen if an eventfd is triggered during setup.
    
    I saw this occasionally with an experimental s390 irqfd implementation:
    
    virtio_blk_handle_output
    -> virtio_blk_data_plane_start
    -> virtio_ccw_set_host_notifier
    ...
    -> virtio_queue_set_host_notifier_fd_handler
    -> virtio_queue_host_notifier_read
    -> virtio_queue_notify_vq
    -> virtio_blk_handle_output
    -> virtio_blk_data_plane_start
    -> vring_setup
    -> hostmem_init
    -> memory_listener_register
    -> BOOM
    
    As virtio-ccw tries to follow what virtio-pci does, it might be triggerable
    for other platforms as well.
    
    Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    8caf907f