Sergio Lopez 9b92fbcf45 virtio-blk: schedule virtio_notify_config to run on main context
virtio_notify_config() needs to acquire the global mutex, which isn't
allowed from an iothread, and may lead to a deadlock like this:

 - main thead
  * Has acquired: qemu_global_mutex.
  * Is trying the acquire: iothread AioContext lock via
    AIO_WAIT_WHILE (after aio_poll).

 - iothread
  * Has acquired: AioContext lock.
  * Is trying to acquire: qemu_global_mutex (via
    virtio_notify_config->prepare_mmio_access).

If virtio_blk_resize() is called from an iothread, schedule
virtio_notify_config() to be run in the main context BH.

[Removed unnecessary newline as suggested by Kevin Wolf
<kwolf@redhat.com>.
--Stefan]

Signed-off-by: Sergio Lopez <slp@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 20190916112411.21636-1-slp@redhat.com
Message-Id: <20190916112411.21636-1-slp@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-10-08 14:28:25 +01:00
..
2019-08-20 17:26:19 +02:00
2019-08-16 13:31:52 +02:00
2019-08-21 09:13:37 +02:00
2019-08-16 13:31:52 +02:00
2019-10-04 18:49:17 +02:00
2019-08-16 13:31:53 +02:00
2019-08-16 13:31:53 +02:00
2019-10-04 18:49:16 +02:00
2019-10-04 19:08:23 +10:00
2019-08-16 13:31:53 +02:00
2019-09-20 14:08:10 -05:00
2019-08-16 13:31:53 +02:00
2019-08-16 13:31:53 +02:00
2019-10-07 13:49:02 +01:00
2019-08-16 13:31:53 +02:00
2019-08-16 13:31:52 +02:00
2019-08-29 07:31:12 +02:00
2019-08-16 13:31:53 +02:00