drm/rockchip: rga: fix potential buffer overflow
authorJacob Chen <jacob2.chen@rock-chips.com>
Fri, 10 Mar 2017 07:21:08 +0000 (15:21 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 14 Mar 2017 01:09:32 +0000 (09:09 +0800)
Change-Id: Id923e38264855320fbe994bed156bf16eac60245
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
drivers/gpu/drm/rockchip/rockchip_drm_rga.h

index 2dbd10d1f85df4152ec961748da137752befdc07..49426eb0034cafdac5b36e0d74e898f89c5b6ff0 100644 (file)
@@ -8,7 +8,7 @@
 /* cmdlist data structure */
 struct rga_cmdlist {
        u32             head;
-       u32             data[RGA_CMDLIST_SIZE * 2];
+       u32             data[(RGA_CMDLIST_SIZE + RGA_CMDBUF_SIZE) * 2];
        u32             last;   /* last data offset */
        void            *src_mmu_pages;
        void            *dst_mmu_pages;