]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nwfilter: spawn thread for reloading on firewalld trigger
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 1 Apr 2022 09:24:37 +0000 (10:24 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 20 Jun 2022 12:15:21 +0000 (13:15 +0100)
commitdae16374dd5ae4bec04dd4fd14672c55620454cd
treec58ade1140665b4fc4a02acfba3d5ea3ba2fbd4f
parent8603b3d76ce54283812a9553da1b6f0e553a71f3
nwfilter: spawn thread for reloading on firewalld trigger

When firewalld is restarted or has its rules reloaded, we trigger a
reload of the nwfilter driver. This is done directly in the main
event loop thread which is a bad idea.

In a previous commit we fixed a actual deadlock problem with the
virStateReload API, when triggered from SIGHUP:

commit 33c6eb9689eb51dfe31dd05b24b3b6b1c948c267
Author: Jim Fehlig <jfehlig@suse.com>
Date:   Thu Mar 8 15:04:48 2018 -0700

    libvirtd: fix potential deadlock when reloading

The same deadlock problem previously existed with the firewalld reload
trigger, however, today it is not quite so series. The QEMU driver uses
a private event thread for each VM, so the particular deadlock would
not occur. None the less during the time the filters are reloading all
use of the event loop is blocked, which prevents APIs being serviced.

Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/nwfilter/nwfilter_driver.c