]> git.ipfire.org Git - thirdparty/libvirt.git/commit
remote_daemon_stream: Fix @client locking in daemonStreamFilter()
authorLanceLiu <liu.lance.89@gmail.com>
Tue, 19 Nov 2019 11:39:50 +0000 (19:39 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 19 Nov 2019 15:09:53 +0000 (16:09 +0100)
commit8ecab214de08a4f145f8407a04851cea2ee914c6
treeb8303ec22283cea227f3f6a28f41d0bd5fef6b01
parent3a085d221e1a30cad79841a15cd910085726dd02
remote_daemon_stream: Fix @client locking in daemonStreamFilter()

When dispatching a message read from client it is first passed
through registered filters. If one of the filters consumes the
message no further processing of the message is done. However,
the filter callbacks are called with the client object locked.
This breaks lock ordering in case of virStream filter, we always
acquire stream private data lock without the client object
locked. In other words, the daemonStreamFilter() does not follow
the lock ordering.

Signed-off-by: LanceLiu <liu.lance.89@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/remote/remote_daemon_stream.c
src/rpc/virnetserverclient.h