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

Re: [Xen-devel] [PATCH] xen: fix domain unlocking in some xsm error paths


  • To: Jan Beulich <JBeulich@xxxxxxxx>, Matthew Daley <mattjd@xxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxx>
  • Date: Wed, 06 Mar 2013 15:34:27 +0000
  • Cc: xen-devel@xxxxxxxxxxxxx
  • Delivery-date: Wed, 06 Mar 2013 15:35:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac4agBYlAWv8d7AUy0eR/JCCEDo5Zw==
  • Thread-topic: [Xen-devel] [PATCH] xen: fix domain unlocking in some xsm error paths

On 28/02/2013 08:50, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

>>>> On 28.02.13 at 03:05, Matthew Daley <mattjd@xxxxxxxxx> wrote:
>> A couple of xsm error/access-denied code paths in hypercalls neglect to
>> unlock a previously locked domain. Fix by ensuring the domains are
>> unlocked correctly.
>> 
>> Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx>
> 
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Keir Fraser <keir@xxxxxxx>

>> --- a/xen/arch/x86/physdev.c
>> +++ b/xen/arch/x86/physdev.c
>> @@ -111,7 +111,7 @@ int physdev_map_pirq(domid_t domid, int type, int *index,
>> int *pirq_p,
>>  
>>      ret = xsm_map_domain_pirq(XSM_TARGET, d);
>>      if ( ret )
>> -        return ret;
>> +        goto free_domain;
>>  
>>      /* Verify or get irq. */
>>      switch ( type )
> 
> So it looks like this is a regression from Daniel's recent XSM rework.
> 
>> --- a/xen/common/grant_table.c
>> +++ b/xen/common/grant_table.c
>> @@ -2283,7 +2283,7 @@
>> gnttab_get_status_frames(XEN_GUEST_HANDLE_PARAM(gnttab_get_status_frames_t)
>> uop,
>>      rc = xsm_grant_setup(XSM_TARGET, current->domain, d);
>>      if ( rc ) {
>>          op.status = GNTST_permission_denied;
>> -        goto out1;
>> +        goto out2;
>>      }
>>  
>>      gt = d->grant_table;
> 
> Whereas this is something that is broken already in 4.2 (but not in
> 4.1). I'll try to remember to pick this up for 4.2 once it got applied
> and came out of staging.
> 
> Jan
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel



_______________________________________________
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®.