[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <96e1494b-46c0-1179-ab70-00fc6ffea1e6@citrix.com>
Date: Mon, 18 Jun 2018 16:18:22 +0800
From: Andrew Cooper <andrew.cooper3@...rix.com>
To: Juergen Gross <jgross@...e.com>, <linux-kernel@...r.kernel.org>,
<xen-devel@...ts.xenproject.org>
CC: <boris.ostrovsky@...cle.com>
Subject: Re: [Xen-devel] [PATCH v2] xen: add new hypercall buffer mapping
device
On 18/06/18 15:36, Juergen Gross wrote:
> +static int privcmd_buf_mmap(struct file *file, struct vm_area_struct *vma)
> +{
> + struct privcmd_buf_private *file_priv = file->private_data;
> + struct privcmd_buf_vma_private *vma_priv;
> + unsigned long count = vma_pages(vma);
> + unsigned int i;
> + int ret = 0;
> +
> + if (!(vma->vm_flags & VM_SHARED) || count > (unsigned long)limit ||
You don't need the unsigned long cast, as limit will be promoted
automatically.
Otherwise, LGTM.
~Andrew
Powered by blists - more mailing lists