mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-27 08:05:24 +00:00
5e9bdccd92
In v5.9.0-273-g8ecab214de I've tried to fix a lock ordering problem, but introduced a crasher. Problem is that because the client lock is unlocked (in order to honour lock ordering) the stream we are currently checking in daemonStreamFilter() might be freed and thus stream->priv might not even exist when the control get to virMutexLock() call. To resolve this, grab an extra reference to the stream and handle its cleanup should the refcounter reach zero after the deref. If that's the case and we are the only ones holding a reference to the stream, we MUST return a positive value to make virNetServerClientDispatchRead() break its loop where it iterates over filters. The problem is, if we did not do so, then "filter = filter->next" line will read from a memory that was just freed (freeing a stream also unregisters its filter). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> |
||
---|---|---|
.. | ||
libvirtd-admin.socket.in | ||
libvirtd-ro.socket.in | ||
libvirtd-tcp.socket.in | ||
libvirtd-tls.socket.in | ||
libvirtd.aug.in | ||
libvirtd.conf.in | ||
libvirtd.libxl.logrotate.in | ||
libvirtd.logrotate.in | ||
libvirtd.lxc.logrotate.in | ||
libvirtd.pod | ||
libvirtd.policy | ||
libvirtd.qemu.logrotate.in | ||
libvirtd.rules | ||
libvirtd.sasl | ||
libvirtd.service.in | ||
libvirtd.socket.in | ||
libvirtd.sysconf | ||
libvirtd.sysctl | ||
lxc_protocol.x | ||
Makefile.inc.am | ||
qemu_protocol.x | ||
remote_daemon_config.c | ||
remote_daemon_config.h | ||
remote_daemon_dispatch.c | ||
remote_daemon_dispatch.h | ||
remote_daemon_stream.c | ||
remote_daemon_stream.h | ||
remote_daemon.c | ||
remote_daemon.h | ||
remote_driver.c | ||
remote_driver.h | ||
remote_protocol.x | ||
test_libvirtd.aug.in | ||
virt-guest-shutdown.target.in | ||
virtproxyd.service.in |