lkml.org 
[lkml]   [2018]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] udmabuf: set read/write flag when exporting
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
On Wed, Nov 14, 2018 at 4:20 AM Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> Otherwise, mmap fails when done with PROT_WRITE.
>
> Suggested-by: Gurchetan Singh <gurchetansingh@chromium.org>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> drivers/dma-buf/udmabuf.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
> index e70328ab7e..d9ff246093 100644
> --- a/drivers/dma-buf/udmabuf.c
> +++ b/drivers/dma-buf/udmabuf.c
> @@ -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)) {
> --
> 2.9.3
>

\
 
 \ /
  Last update: 2018-11-16 02:47    [W:0.284 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site