Re: [PATCH 1.5/6] conf: net: Fix deadlock if assignment of network def fails

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

 



On 10/26/2012 08:55 AM, Peter Krempa wrote:
> When the assignment fails, the network object is not unlocked and next
> call that would use it deadlocks.
> ---
>  src/conf/network_conf.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
> index 93d1b4c..1955853 100644
> --- a/src/conf/network_conf.c
> +++ b/src/conf/network_conf.c
> @@ -295,6 +295,7 @@ virNetworkAssignDef(virNetworkObjListPtr nets,
>
>      if ((network = virNetworkFindByName(nets, def->name))) {
>          if (virNetworkObjAssignDef(network, def, live) < 0) {
> +            virNetworkObjUnlock(network);
>              return NULL;
>          }
>          return network;

ACK.

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