From: "Jan Beulich" Subject: linux c/s 866 Date: Mon, 04 May 2009 10:14:17 +0100 Message-ID: <49FECE09.76EA.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: 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: Isaku Yamahata Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >@@ -329,11 +329,15 @@ static pte_t blktap_clear_pte(struct vm_ > * If the address is before the start of the grant mapped region = or > * if vm_file is NULL (meaning mmap failed and we have nothing to = do) > */ >- if (uvaddr < uvstart || vma->vm_file =3D=3D NULL) >+ if (vma->vm_file !=3D NULL) { >+ info =3D vma->vm_file->private_data; >+ uvstart =3D info->rings_vstart + (RING_PAGES << PAGE_SHIFT)= ; >+ } else >+ uvstart =3D uvaddr; /* make the following if clause = true */ >+ if (uvaddr < uvstart) > return ptep_get_and_clear_full(vma->vm_mm, uvaddr,=20 > ptep, is_fullmm); It would appear to me as if the comment and the code are out of sync: Assigning uvaddr to uvstart makes the if clause's condition false whenever vm->vm_file =3D=3D NULL. According to how the old code worked, I'd say the code needs to be fixed, but I'm not certain, hence I'm hesitant to submit = a patch... Jan