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

Re: [Xen-devel] Re: [PATCH 5/7 v2] xen-gntdev: Add reference counting to

To: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH 5/7 v2] xen-gntdev: Add reference counting to maps
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Mon, 10 Jan 2011 17:28:11 -0500
Cc: jeremy@xxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian.Campbell@xxxxxxxxxx
Delivery-date: Mon, 10 Jan 2011 14:30:59 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D0B8050.7050800@xxxxxxxxxxxxx>
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>
References: <1292545063-32107-1-git-send-email-dgdegra@xxxxxxxxxxxxx> <1292545063-32107-6-git-send-email-dgdegra@xxxxxxxxxxxxx> <4D0B8050.7050800@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
> -static int gntdev_del_map(struct grant_map *map)
> +static void gntdev_put_map(struct grant_map *map)

Aha.. here it is.

.. snip ..
> @@ -606,6 +594,8 @@ static int gntdev_mmap(struct file *flip, struct 
> vm_area_struct *vma)
>               goto unlock_out;
>       }
>  
> +     atomic_inc(&map->users);
> +
>       vma->vm_ops = &gntdev_vmops;
>  
>       vma->vm_flags |= VM_RESERVED;
> @@ -614,6 +604,7 @@ static int gntdev_mmap(struct file *flip, struct 
> vm_area_struct *vma)
>       vma->vm_flags |= VM_PFNMAP;
>  
>       vma->vm_private_data = map;
> +

No need for that.

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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel] Re: [PATCH 5/7 v2] xen-gntdev: Add reference counting to maps, Konrad Rzeszutek Wilk <=