]> git.ipfire.org Git - thirdparty/libvirt.git/commit
rpc: Fix deadlock if there is no worker pool available
authorMarc Hartmayer <mhartmay@linux.ibm.com>
Tue, 3 Jul 2018 11:37:33 +0000 (13:37 +0200)
committerJohn Ferlan <jferlan@redhat.com>
Sat, 21 Jul 2018 11:46:42 +0000 (07:46 -0400)
commit45e00c7f2d9094de8ac90ea24b3638ca514013fb
treeb62967030f544f09c4694563f3442e16096a43be
parent80250f70c506beb31720b2d463edd0c78e0ed887
rpc: Fix deadlock if there is no worker pool available

@srv must be unlocked for the call virNetServerProcessMsg otherwise a
deadlock can occur.

Since the pointer 'srv->workers' will never be changed after
initialization and the thread pool has it's own locking we can release
the lock of 'srv' earlier. This also fixes the deadlock.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/rpc/virnetserver.c