aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <[email protected]>2018-11-14 13:20:29 +0100
committerGerd Hoffmann <[email protected]>2018-11-16 08:50:53 +0100
commit5c074eeabbd332b11559f7fc1e89d456f94801fb (patch)
treedcd9cb8d2ca28efa019a418594150aea703f6c20
parentfcc86cb45d38ca2f24bcea9c29c7f4742041caed (diff)
udmabuf: set read/write flag when exporting
Otherwise, mmap fails when done with PROT_WRITE. Suggested-by: Gurchetan Singh <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: Gurchetan Singh <[email protected]> Tested-by: Gurchetan Singh <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/dma-buf/udmabuf.c1
1 files changed, 1 insertions, 0 deletions
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)) {