mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-19 14:08:39 -07:00
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>
|
||
|---|---|---|
| .. | ||
| dataplane | ||
| block.c | ||
| cdrom.c | ||
| ecc.c | ||
| fdc.c | ||
| hd-geometry.c | ||
| Kconfig | ||
| m25p80.c | ||
| Makefile.objs | ||
| nand.c | ||
| nvme.c | ||
| nvme.h | ||
| onenand.c | ||
| pflash_cfi01.c | ||
| pflash_cfi02.c | ||
| tc58128.c | ||
| trace-events | ||
| vhost-user-blk.c | ||
| virtio-blk.c | ||
| xen-block.c | ||
| xen_blkif.h | ||