Commit 5c074eea authored by Gerd Hoffmann's avatar Gerd Hoffmann

udmabuf: set read/write flag when exporting

Otherwise, mmap fails when done with PROT_WRITE.
Suggested-by: default avatarGurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: default avatarGurchetan Singh <gurchetansingh@chromium.org>
Tested-by: default avatarGurchetan Singh <gurchetansingh@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20181114122029.16766-1-kraxel@redhat.com
parent fcc86cb4
...@@ -184,6 +184,7 @@ static long udmabuf_create(const struct udmabuf_create_list *head, ...@@ -184,6 +184,7 @@ static long udmabuf_create(const struct udmabuf_create_list *head,
exp_info.ops = &udmabuf_ops; exp_info.ops = &udmabuf_ops;
exp_info.size = ubuf->pagecount << PAGE_SHIFT; exp_info.size = ubuf->pagecount << PAGE_SHIFT;
exp_info.priv = ubuf; exp_info.priv = ubuf;
exp_info.flags = O_RDWR;
buf = dma_buf_export(&exp_info); buf = dma_buf_export(&exp_info);
if (IS_ERR(buf)) { if (IS_ERR(buf)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment