Re: [RFC 3/6] udmabuf: enforce access flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  static int mmap_udmabuf(struct dma_buf *buf, struct vm_area_struct *vma)
>  {
>  	struct udmabuf *ubuf = buf->priv;
> +	pgprot_t pgprot = vm_get_page_prot(vma->vm_flags);
>  
>  	if ((vma->vm_flags & (VM_SHARED | VM_MAYSHARE)) == 0)
>  		return -EINVAL;
>  
> +	if (ubuf->flags & UDMABUF_FLAGS_PROT_NONE)
> +		return -EINVAL;
> +
> +	if ((ubuf->flags & UDMABUF_FLAGS_PROT_READ) == 0)

"if ((vma->vm_flags & VM_READ) == 0)" ?

cheers,
  Gerd

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux