From: "Jan Beulich" Subject: [PATCH] x86: fix improper return value from relinquish_memory() Date: Wed, 24 Mar 2010 11:07:35 +0000 Message-ID: <4BAA00870200007800036B93@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part1F35F067.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com 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. --=__Part1F35F067.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline While apparently only a theoretical possibility (domain_kill() has a BUG_ON() that wasn't reported to trigger so far), I still think it is better to have the code cleaned up. Signed-off-by: Jan Beulich --- 2010-03-22.orig/xen/arch/x86/domain.c 2010-03-22 00:00:00.0000000= 00 +0100 +++ 2010-03-22/xen/arch/x86/domain.c 2010-03-24 11:57:49.000000000 = +0100 @@ -1821,8 +1821,10 @@ static int relinquish_memory( { case 0: break; - case -EAGAIN: case -EINTR: + ret =3D -EAGAIN; + /* fallthrough */ + case -EAGAIN: page_list_add(page, list); set_bit(_PGT_pinned, &page->u.inuse.type_info); put_page(page); --=__Part1F35F067.0__= Content-Type: text/plain; name="x86-domain-cleanup-EINTR.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-domain-cleanup-EINTR.patch" While apparently only a theoretical possibility (domain_kill() has = a=0ABUG_ON() that wasn't reported to trigger so far), I still think it = is=0Abetter to have the code cleaned up.=0A=0ASigned-off-by: Jan Beulich = =0A=0A--- 2010-03-22.orig/xen/arch/x86/domain.c = 2010-03-22 00:00:00.000000000 +0100=0A+++ 2010-03-22/xen/arch/x86/domain.c = 2010-03-24 11:57:49.000000000 +0100=0A@@ -1821,8 +1821,10 @@ static int = relinquish_memory(=0A {=0A case 0:=0A = break;=0A- case -EAGAIN:=0A case -EINTR:=0A+ ret = =3D -EAGAIN;=0A+ /* fallthrough */=0A+ case -EAGAIN:=0A = page_list_add(page, list);=0A set_bit(_PGT_pinned, = &page->u.inuse.type_info);=0A put_page(page);=0A --=__Part1F35F067.0__= 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.xensource.com http://lists.xensource.com/xen-devel --=__Part1F35F067.0__=--