WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] linux c/s 866

To: "Isaku Yamahata" <yamahata@xxxxxxxxxxxxx>
Subject: [Xen-devel] linux c/s 866
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Mon, 04 May 2009 10:14:17 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 04 May 2009 02:13:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>@@ -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 == NULL)
>+      if (vma->vm_file != NULL) {
>+              info = vma->vm_file->private_data;
>+              uvstart = info->rings_vstart + (RING_PAGES << PAGE_SHIFT);
>+      } else
>+              uvstart = uvaddr;       /* make the following if clause true */
>+      if (uvaddr < uvstart)
>               return ptep_get_and_clear_full(vma->vm_mm, uvaddr, 
>                                              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 == 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>