From fdb67c70982bf402b54641de2a2d4f4d7d41e609 Mon Sep 17 00:00:00 2001 From: Zhongfu Luo Date: Tue, 15 Oct 2019 13:49:33 +0800 Subject: [PATCH] efuse: fix KASAN bug [1/1] PD#TV-11119 Problem: BUG: KASAN: stack-out-of-bounds in meson64_trustzone_efuse+0x168/0x268 Solution: fix retcnt variable type Verify: tl1 skt Change-Id: I54d9bb598277db539b68f2e741288348eb026e01 Signed-off-by: Zhongfu Luo --- drivers/amlogic/efuse/efuse_hw64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/efuse/efuse_hw64.c b/drivers/amlogic/efuse/efuse_hw64.c index f73959033bf9..98be948a6d6a 100644 --- a/drivers/amlogic/efuse/efuse_hw64.c +++ b/drivers/amlogic/efuse/efuse_hw64.c @@ -185,7 +185,7 @@ ssize_t _efuse_read(char *buf, size_t count, loff_t *ppos) unsigned int pos = *ppos; struct efuse_hal_api_arg arg; - unsigned int retcnt; + unsigned long retcnt; int ret; arg.cmd = EFUSE_HAL_API_READ; @@ -208,7 +208,7 @@ ssize_t _efuse_write(const char *buf, size_t count, loff_t *ppos) unsigned int pos = *ppos; struct efuse_hal_api_arg arg; - unsigned int retcnt; + unsigned long retcnt; int ret; arg.cmd = EFUSE_HAL_API_WRITE;