On 05/06/15 14:32, Jan Beulich wrote:
>>>> On 02.06.15 at 18:26, <david.vra...@citrix.com> wrote:
>> @@ -546,13 +567,19 @@ static void mapcount(
>>  
>>      *wrc = *rdc = 0;
>>  
>> +    /*
>> +     * Must have the remote domain's grant table lock while counting
>> +     * its active entries.
>> +     */
>> +    ASSERT(spin_is_locked(&rd->grant_table->lock));
>> +
>>      for ( handle = 0; handle < lgt->maptrack_limit; handle++ )
> 
> The comment and the use of lgt->maptrack_limit contradict the
> documentation you add in patch 2, and it indeed is unclear why
> at this point the local domain's lock (its maptrack lock starting
> with patch 2) doesn't also need to be held.

Maybe it's a a bit subtle, but holding the local (write) lock means no
new mappings can be created and thus lgt->maptrack_limit cannot change.

Should I add

ASSERT(spin_is_locked(&lgt->lock));

here as well?

David

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

Reply via email to