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-changelog

[Xen-changelog] [linux-2.6.18-xen] linux/blktap: fix blktap_clear_pte().

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] linux/blktap: fix blktap_clear_pte().
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 05 May 2009 15:20:05 -0700
Delivery-date: Tue, 05 May 2009 15:20:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1241526775 -3600
# Node ID 42dfb4e2bce075458446970be280f03d151db0f2
# Parent  978499ee4f39e277c9617f0aef5e34ea5ef40bf9
linux/blktap: fix blktap_clear_pte().

fix blktap_clear_pte(). In case of vma->vm_file == NULL
case wasn't handled correctly.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 drivers/xen/blktap/blktap.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff -r 978499ee4f39 -r 42dfb4e2bce0 drivers/xen/blktap/blktap.c
--- a/drivers/xen/blktap/blktap.c       Tue Apr 28 13:44:22 2009 +0100
+++ b/drivers/xen/blktap/blktap.c       Tue May 05 13:32:55 2009 +0100
@@ -314,7 +314,7 @@ static pte_t blktap_clear_pte(struct vm_
        pte_t copy;
        tap_blkif_t *info = NULL;
        int offset, seg, usr_idx, pending_idx, mmap_idx;
-       unsigned long uvstart;
+       unsigned long uvstart = 0;
        unsigned long kvaddr;
        struct page *pg;
        struct grant_handle_pair *khandle;
@@ -328,9 +328,8 @@ static pte_t blktap_clear_pte(struct vm_
        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)
+       }
+       if (vma->vm_file == NULL || uvaddr < uvstart)
                return ptep_get_and_clear_full(vma->vm_mm, uvaddr, 
                                               ptep, is_fullmm);
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] linux/blktap: fix blktap_clear_pte()., Xen patchbot-linux-2.6.18-xen <=