From: "Jan Beulich" Subject: Re: [PATCH] linux/balloon: Fix hugepage-related bugs Date: Tue, 22 Dec 2009 07:55:38 +0000 Message-ID: <4B30898A02000078000271B7@vpn.id2.novell.com> References: <20091221195052.17678.32248.sendpatchset@magnum.int.mccr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20091221195052.17678.32248.sendpatchset@magnum.int.mccr.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge , Dave McCracken Cc: Xen Developers List List-Id: xen-devel@lists.xenproject.org Acked-by: Jan Beulich >>> Dave McCracken 21.12.09 20:50 >>> >@@ -595,7 +600,7 @@ void free_empty_pages_and_pagevec(struct > npages =3D (nr_pages + (balloon_npages-1)) >> balloon_order; >=20 > mutex_lock(&balloon_mutex); >- for (i =3D 0; i < nr_pages; i++) { >+ for (i =3D 0; i < npages; i++) { > page =3D pagevec[i << balloon_order]; > BUG_ON(page_count(page) !=3D 1); Wouldn't it be reasonable to also extend this check to all constituent pages? > balloon_append(page); Jan