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

2019-07-31 Thread Gerd Hoffmann
> 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 (ubu

[RFC 3/6] udmabuf: enforce access flags

2019-07-31 Thread Gurchetan Singh
Enforce the access flags that were added earlier. Signed-off-by: Gurchetan Singh --- drivers/dma-buf/udmabuf.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index 4ecf2a94fed3..134e53d24c2b 100644 --- a/drivers/dma-buf/udmabuf.