Re: [PATCH v1 30/31] qemu: Don't leak storage perms on failure in qemuDomainAttachDiskGeneric

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

 



On Thu, Jul 11, 2019 at 17:54:17 +0200, Michal Privoznik wrote:
> At the very beginning of the attach function the
> qemuDomainStorageSourceChainAccessAllow() is called which
> modifies CGroups, locks and seclabels for new disk and its
> backing chain. This must be followed by a counterpart which
> reverts back all the changes if something goes wrong. This boils
> down to calling qemuDomainStorageSourceChainAccessRevoke() which
> is done under 'error' label. But not all failure branches jump
> there. They just jump onto 'cleanup' label where no revoke is
> done. Such mistake is easy to do because 'cleanup' label does
> exist. Therefore, dissolve 'error' block in 'cleanup' and have
> everything jump onto 'cleanup' label.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/qemu/qemu_hotplug.c | 19 +++++++++----------
>  1 file changed, 9 insertions(+), 10 deletions(-)

ACK

Attachment: signature.asc
Description: PGP signature

--
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]

  Powered by Linux