diff mbox

[v3,4/5] tools/libxc: error handling for the postcopy() callback

Message ID 1452235131-1861-5-git-send-email-wency@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wen Congyang Jan. 8, 2016, 6:38 a.m. UTC
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/libxc/xc_sr_save.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Yang Hongyang Jan. 26, 2016, 6:45 a.m. UTC | #1
ditto

Reviewed-by: Yang Hongyang <hongyang.yang@easystack.cn>

On 01/08/2016 02:38 PM, Wen Congyang wrote:
> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
>   tools/libxc/xc_sr_save.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c
> index e532168..e4ba560 100644
> --- a/tools/libxc/xc_sr_save.c
> +++ b/tools/libxc/xc_sr_save.c
> @@ -791,7 +791,9 @@ static int save(struct xc_sr_context *ctx, uint16_t guest_type)
>               if ( rc )
>                   goto err;
>
> -            ctx->save.callbacks->postcopy(ctx->save.callbacks->data);
> +            rc = ctx->save.callbacks->postcopy(ctx->save.callbacks->data);
> +            if ( rc <= 0 )
> +                goto err;
>
>               rc = ctx->save.callbacks->checkpoint(ctx->save.callbacks->data);
>               if ( rc <= 0 )
>
Wen Congyang Jan. 26, 2016, 6:48 a.m. UTC | #2
On 01/26/2016 02:45 PM, Yang Hongyang wrote:
> ditto
> 
> Reviewed-by: Yang Hongyang <hongyang.yang@easystack.cn>

The newest version is v5, and this series is in the staging now.

Thanks for your review.
Wen Congyang

> 
> On 01/08/2016 02:38 PM, Wen Congyang wrote:
>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
>> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> ---
>>   tools/libxc/xc_sr_save.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c
>> index e532168..e4ba560 100644
>> --- a/tools/libxc/xc_sr_save.c
>> +++ b/tools/libxc/xc_sr_save.c
>> @@ -791,7 +791,9 @@ static int save(struct xc_sr_context *ctx, uint16_t guest_type)
>>               if ( rc )
>>                   goto err;
>>
>> -            ctx->save.callbacks->postcopy(ctx->save.callbacks->data);
>> +            rc = ctx->save.callbacks->postcopy(ctx->save.callbacks->data);
>> +            if ( rc <= 0 )
>> +                goto err;
>>
>>               rc = ctx->save.callbacks->checkpoint(ctx->save.callbacks->data);
>>               if ( rc <= 0 )
>>
>
Yang Hongyang Jan. 26, 2016, 7:02 a.m. UTC | #3
On 01/26/2016 02:48 PM, Wen Congyang wrote:
> On 01/26/2016 02:45 PM, Yang Hongyang wrote:
>> ditto
>>
>> Reviewed-by: Yang Hongyang <hongyang.yang@easystack.cn>
>
> The newest version is v5, and this series is in the staging now.

Sorry for the noise...I saw the series too late, please ignore my
comments...

>
> Thanks for your review.
> Wen Congyang
>
>>
>> On 01/08/2016 02:38 PM, Wen Congyang wrote:
>>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
>>> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>> ---
>>>    tools/libxc/xc_sr_save.c | 4 +++-
>>>    1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c
>>> index e532168..e4ba560 100644
>>> --- a/tools/libxc/xc_sr_save.c
>>> +++ b/tools/libxc/xc_sr_save.c
>>> @@ -791,7 +791,9 @@ static int save(struct xc_sr_context *ctx, uint16_t guest_type)
>>>                if ( rc )
>>>                    goto err;
>>>
>>> -            ctx->save.callbacks->postcopy(ctx->save.callbacks->data);
>>> +            rc = ctx->save.callbacks->postcopy(ctx->save.callbacks->data);
>>> +            if ( rc <= 0 )
>>> +                goto err;
>>>
>>>                rc = ctx->save.callbacks->checkpoint(ctx->save.callbacks->data);
>>>                if ( rc <= 0 )
>>>
>>
>
>
>
>
Ian Campbell Jan. 26, 2016, 4:08 p.m. UTC | #4
On Tue, 2016-01-26 at 15:02 +0800, Yang Hongyang wrote:
> 
> On 01/26/2016 02:48 PM, Wen Congyang wrote:
> > On 01/26/2016 02:45 PM, Yang Hongyang wrote:
> > > ditto
> > > 
> > > Reviewed-by: Yang Hongyang <hongyang.yang@easystack.cn>
> > 
> > The newest version is v5, and this series is in the staging now.
> 
> Sorry for the noise...I saw the series too late, please ignore my
> comments...

Is an update to the MAINTAINERS file required?

Ian.
diff mbox

Patch

diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c
index e532168..e4ba560 100644
--- a/tools/libxc/xc_sr_save.c
+++ b/tools/libxc/xc_sr_save.c
@@ -791,7 +791,9 @@  static int save(struct xc_sr_context *ctx, uint16_t guest_type)
             if ( rc )
                 goto err;
 
-            ctx->save.callbacks->postcopy(ctx->save.callbacks->data);
+            rc = ctx->save.callbacks->postcopy(ctx->save.callbacks->data);
+            if ( rc <= 0 )
+                goto err;
 
             rc = ctx->save.callbacks->checkpoint(ctx->save.callbacks->data);
             if ( rc <= 0 )