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

Reply via email to