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

Re: [Xen-devel] [PATCH 1/2] memory: exit early from memory_exchange() upon write-back error



>>> On 04.04.17 at 20:45, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 04/04/17 14:13, Jan Beulich wrote:
>> --- a/xen/common/memory.c
>> +++ b/xen/common/memory.c
> 
> As an observation, I find it amusing that there is a comment just above
> this which states
> 
> /*
>  * Success! Beyond this point we cannot fail for this chunk.
>  */

I don't understand the "amusing" part: It's a point of no return,
hence there mustn't be any immediate exit from any of the
following processing upon encountering some kind of error. It's
just that ignoring errors went a little too far here.

Jan

>> @@ -639,6 +639,9 @@ static long memory_exchange(XEN_GUEST_HA
>>              }
>>          }
>>          BUG_ON( !(d->is_dying) && (j != (1UL << out_chunk_order)) );
>> +
>> +        if ( rc )
>> +            goto fail;
>>      }
>>  
>>      exch.nr_exchanged = exch.in.nr_extents;
>>
>>
>>




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.