diff mbox series

udmabuf: set read/write flag when exporting

Message ID 20181030013237.58933-1-gurchetansingh@chromium.org (mailing list archive)
State New, archived
Headers show
Series udmabuf: set read/write flag when exporting | expand

Commit Message

Gurchetan Singh Oct. 30, 2018, 1:32 a.m. UTC
Otherwise, mmap fails when done with PROT_WRITE.
---
 drivers/dma-buf/udmabuf.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Gerd Hoffmann Oct. 30, 2018, 6:19 a.m. UTC | #1
On Mon, Oct 29, 2018 at 06:32:37PM -0700, Gurchetan Singh wrote:
> Otherwise, mmap fails when done with PROT_WRITE.

Patch looks good, but sign-off is missing.

cheers,
  Gerd
diff mbox series

Patch

diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 5b44ef226904..fc359ca4503d 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf/udmabuf.c
@@ -184,6 +184,7 @@  static long udmabuf_create(const struct udmabuf_create_list *head,
 	exp_info.ops  = &udmabuf_ops;
 	exp_info.size = ubuf->pagecount << PAGE_SHIFT;
 	exp_info.priv = ubuf;
+	exp_info.flags = O_RDWR;
 
 	buf = dma_buf_export(&exp_info);
 	if (IS_ERR(buf)) {