Re: [Qemu-devel] [PATCH v5 2/4] monitor: protect mon->fds with mon_lock

2018-05-17 Thread Markus Armbruster
Peter Xu writes: > mon->fds were protected by BQL. Now protect it by mon_lock so that it > can even be used in monitor iothread. > > Signed-off-by: Peter Xu Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v5 2/4] monitor: protect mon->fds with mon_lock

2018-05-10 Thread Stefan Hajnoczi
On Wed, May 09, 2018 at 12:17:32PM +0800, Peter Xu wrote: > mon->fds were protected by BQL. Now protect it by mon_lock so that it > can even be used in monitor iothread. Only monitor_get_fd() can safely be called from the monitor iothread (oob). The other functions call close(2), which may block

[Qemu-devel] [PATCH v5 2/4] monitor: protect mon->fds with mon_lock

2018-05-08 Thread Peter Xu
mon->fds were protected by BQL. Now protect it by mon_lock so that it can even be used in monitor iothread. Signed-off-by: Peter Xu --- monitor.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index 14c681dc8a..d6c3c08932 100644