From: "Jan Beulich" Subject: [PATCH] fix page_list_splice() Date: Wed, 06 Jun 2012 09:23:12 +0100 Message-ID: <4FCF2F90020000780008868A@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part9BB51660.1__=" Return-path: 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: Jisoo Yang 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. --=__Part9BB51660.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Other than in __list_splice(), the first element's prev pointer doesn't need adjustment here - it already is PAGE_LIST_NULL. Rather than fixing the assignment (to formally match __list_splice()), simply assert that this assignment is really unnecessary. Reported-by: Jisoo Yang Signed-off-by: Jan Beulich --- a/xen/include/xen/mm.h +++ b/xen/include/xen/mm.h @@ -270,7 +270,8 @@ page_list_splice(struct page_list_head * last =3D list->tail; at =3D head->next; =20 - first->list.prev =3D page_to_pdx(head->next); + /* Both first->list.prev and at->list.prev are PAGE_LIST_NULL. */ + ASSERT(first->list.prev =3D=3D at->list.prev); head->next =3D first; =20 last->list.next =3D page_to_pdx(at); --=__Part9BB51660.1__= Content-Type: text/plain; name="page-list-splice.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="page-list-splice.patch" fix page_list_splice()=0A=0AOther than in __list_splice(), the first = element's prev pointer doesn't=0Aneed adjustment here - it already is = PAGE_LIST_NULL. Rather than fixing=0Athe assignment (to formally match = __list_splice()), simply assert that=0Athis assignment is really unnecessar= y.=0A=0AReported-by: Jisoo Yang =0ASigned-off-by: Jan = Beulich =0A=0A--- a/xen/include/xen/mm.h=0A+++ = b/xen/include/xen/mm.h=0A@@ -270,7 +270,8 @@ page_list_splice(struct = page_list_head *=0A last =3D list->tail;=0A at =3D head->next;=0A = =0A- first->list.prev =3D page_to_pdx(head->next);=0A+ /* Both = first->list.prev and at->list.prev are PAGE_LIST_NULL. */=0A+ ASSERT(fir= st->list.prev =3D=3D at->list.prev);=0A head->next =3D first;=0A =0A = last->list.next =3D page_to_pdx(at);=0A --=__Part9BB51660.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 --=__Part9BB51660.1__=--