Re: [PATCH v2 1/2] daemon: Fix segfault by reloading daemon right after start

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 18, 2015 at 05:34:39PM +0100, Pavel Hrdina wrote:
> Libvirt could crash with segfault if user issue "service reload" right
> after "service start". One possible way to crash libvirt is to run reload
> during initialization of QEMU driver.
> 
> It could happen when qemu driver will initialize qemu_driver_lock but
> don't have a time to set it's "config" and the SIGHUP arrives. The
> reload handler tries to get qemu_drv->config during "virStorageAutostart"
> and dereference it which ends with segfault.
> 
> Let's ignore all reload requests until all drivers are initialized. In
> addition set "driversInitialized" before we enter "virStateCleanup" to
> ignore reload request while we are shutting down.
> 
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1179981
> 
> Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
> ---
> 
> diff to v1:
>  - ignore reload also during virStateCleanup
> 
>  daemon/libvirtd.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)

ACK

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]