From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: [PATCH] common/memory: fix an XSM error path Date: Mon, 12 Jan 2015 08:21:30 +0000 Message-ID: <54B3921A0200007800053746@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part1124FB1A.1__=" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YAaFi-00040G-A4 for xen-devel@lists.xenproject.org; Mon, 12 Jan 2015 08:21:34 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Ian Campbell , Keir Fraser , dgdegra@tycho.nsa.gov, Ian Jackson , Tim Deegan List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part1124FB1A.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 --- 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 =3D d; =20 - rc =3D 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; } =20 switch ( op ) --=__Part1124FB1A.1__= Content-Type: text/plain; name="memop-XSM-error-path.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="memop-XSM-error-path.patch" common/memory: fix an XSM error path=0A=0AXENMEM_{in,de}crease_reservation = as well as XENMEM_populate_physmap=0Areturn the extent at which failure = was detected, not error indicators.=0A=0ASigned-off-by: Jan Beulich = =0A=0A--- a/xen/common/memory.c=0A+++ b/xen/common/memor= y.c=0A@@ -747,11 +747,10 @@ long do_memory_op(unsigned long cmd, XEN=0A = return start_extent;=0A args.domain =3D d;=0A =0A- = rc =3D xsm_memory_adjust_reservation(XSM_TARGET, current->domain, d);=0A- = if ( rc )=0A+ if ( xsm_memory_adjust_reservation(XSM_TARGET, = current->domain, d) )=0A {=0A rcu_unlock_domain(d);=0A-= return rc;=0A+ return start_extent;=0A }=0A = =0A switch ( op )=0A --=__Part1124FB1A.1__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__Part1124FB1A.1__=--