LOCAL / GPU: ARM: Add proper flag handle extended mmap offset operations
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 3 Dec 2018 13:37:01 +0000 (14:37 +0100)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 14 Feb 2019 05:57:45 +0000 (14:57 +0900)
Since stable commit 16d7ceb04b55 ("mmap: introduce sane default mmap
limits"), drivers, which use mmap offset needs to set additional flag
in ->open() call, so set this flag in MALI drivers too.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
drivers/gpu/arm/midgard/r12p0_04rel0/mali_kbase_core_linux.c

index 3cc6214..bed124e 100644 (file)
@@ -1372,6 +1372,7 @@ static int kbase_open(struct inode *inode, struct file *filp)
 
        init_waitqueue_head(&kctx->event_queue);
        filp->private_data = kctx;
+       filp->f_mode |= FMODE_UNSIGNED_OFFSET;
        kctx->filp = filp;
 
        kctx->infinite_cache_active = kbdev->infinite_cache_active_default;