Re: [PATCH]lxc: make sure root wouldn't be null

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

 



On 11/12/2013 04:03 PM, Chen Hanxiao wrote:
> ping
> 

see virLXCProcessEnsureRootFS, we already make sure the root is exist
for libvirt-lxc.

>> -----Original Message-----
>> From: Chen Hanxiao [mailto:chenhanxiao@xxxxxxxxxxxxxx]
>> Sent: Tuesday, November 05, 2013 5:57 PM
>> To: libvir-list@xxxxxxxxxx
>> Cc: chenhanxiao@xxxxxxxxxxxxxx
>> Subject: [PATCH]lxc: make sure root wouldn't be null
>>
>> From: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx>
>>
>> virDomainGetRootFilesystem may return null.
>> We should take care of it.
>>
>> Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx>
>> ---
>>  src/lxc/lxc_container.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
>> index 255c711..e8f7a75 100644
>> --- a/src/lxc/lxc_container.c
>> +++ b/src/lxc/lxc_container.c
>> @@ -1829,7 +1829,8 @@ static int lxcContainerChild(void *data)
>>      if (lxcContainerSetID(vmDef) < 0)
>>          goto cleanup;
>>
>> -    root = virDomainGetRootFilesystem(vmDef);
>> +    if (!(root = virDomainGetRootFilesystem(vmDef)))
>> +        goto cleanup;
>>
>>      if (argv->nttyPaths) {
>>          const char *tty = argv->ttyPaths[0];
>> --
>> 1.8.2.1
> 
> 
> 
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list
> 

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