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

Re: [Xen-devel] [PATCH v3 1/2] gnttab: Introduce rwlock to protect updates to grant table state



>>> On 09.01.15 at 14:05, <chegger@xxxxxxxxx> wrote:
> On 2014/12/18 12:37, Jan Beulich wrote:
>>>>> On 03.12.14 at 15:29, <chegger@xxxxxxxxx> wrote:
>>> --- a/xen/common/grant_table.c
>>> +++ b/xen/common/grant_table.c
> [...]
>>> @@ -944,6 +944,7 @@ __gnttab_unmap_common(
>>>      }
>>>  
>>>      op->rd = rd;
>>> +    read_lock(&rgt->lock);
>>>      act = &active_entry(rgt, op->map->ref);
>>>  
>>>      if ( op->frame == 0 )
>> 
>> The nesting of the two locks should be mentioned in the doc change.
> 
> Where do you see the nesting coming from?

Reproducing the subsequent hunk I had commented on

> @@ -1004,6 +1005,7 @@ __gnttab_unmap_common(
>  
>   unmap_out:
>      double_gt_unlock(lgt, rgt);
> +    read_unlock(&rgt->lock);

there obviously are two (or really three) locks in simultaneous use
here.

Jan


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


 


Rackspace

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