Skip to contentSkip to conversation

udmabuf: set read/write flag when exporting

PATCH In review Gerd Hoffmann 2 participants 3 messages Nov 14, 2018 – Nov 16, 2018

Subsystems (3)
lore
Share & tools
lore

Gerd Hoffmann

author maintainer
#0 lore raw

PATCH 1/1 udmabuf: set read/write flag when exporting

Otherwise, mmap fails when done with PROT_WRITE.

---
 drivers/dma-buf/udmabuf.c | 1 +
 1 file changed, 1 insertion(+)
drivers/dma-buf/udmabuf.c +1 -0
index e70328ab7e..d9ff246093 100644
@@ -189,6 +189,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)) {
Signature · 1 line
2.9.3
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 22 lines · Gerd Hoffmann

Otherwise, mmap fails when done with PROT_WRITE.

---
 drivers/dma-buf/udmabuf.c | 1 +
 1 file changed, 1 insertion(+)
drivers/dma-buf/udmabuf.c +1 -1
index e70328ab7e..d9ff246093 100644
@@ -189,6 +189,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)) {
--
Quoted 2 lines

2.9.3

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel