From: Daniel De Graaf Subject: Re: [PATCH] common/memory: fix an XSM error path Date: Mon, 12 Jan 2015 16:53:02 -0500 Message-ID: <54B4423E.6030009@tycho.nsa.gov> References: <54B3921A0200007800053746@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YAmvS-00085N-In for xen-devel@lists.xenproject.org; Mon, 12 Jan 2015 21:53:30 +0000 In-Reply-To: <54B3921A0200007800053746@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel Cc: Ian Campbell , Keir Fraser , Ian Jackson , Tim Deegan List-Id: xen-devel@lists.xenproject.org On 01/12/2015 03:21 AM, Jan Beulich wrote: > XENMEM_{in,de}crease_reservation as well as XENMEM_populate_physmap > return the extent at which failure was detected, not error indicators. > > Signed-off-by: Jan Beulich Acked-by: Daniel De Graaf (though I don't think my ack is technically required here) > --- a/xen/common/memory.c > +++ b/xen/common/memory.c > @@ -747,11 +747,10 @@ long do_memory_op(unsigned long cmd, XEN > return start_extent; > args.domain = d; > > - rc = xsm_memory_adjust_reservation(XSM_TARGET, current->domain, d); > - if ( rc ) > + if ( xsm_memory_adjust_reservation(XSM_TARGET, current->domain, d) ) > { > rcu_unlock_domain(d); > - return rc; > + return start_extent; > } > > switch ( op ) > > > -- Daniel De Graaf National Security Agency