aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memory/omap-gpmc.c
diff options
context:
space:
mode:
authorMarkus Mayer <mmayer@broadcom.com>2020-08-22 13:50:00 -0700
committerKrzysztof Kozlowski <krzk@kernel.org>2020-08-22 22:53:28 +0200
commitf42ae4bbf94c15aa720afb9d176ecbfe140d792e (patch)
tree2c56fcfe66fbd954c81a5b6371eb149c6b7a5c2a /drivers/memory/omap-gpmc.c
parentmemory: brcmstb_dpfe: Fix memory leak (diff)
downloadlinux-dev-f42ae4bbf94c15aa720afb9d176ecbfe140d792e.tar.xz
linux-dev-f42ae4bbf94c15aa720afb9d176ecbfe140d792e.zip
memory: brcmstb_dpfe: fix array index out of bounds
We would overrun the error_text array if we hit a TIMEOUT condition, because we were using the error code "ETIMEDOUT" (which is 110) as an array index. We fix the problem by correcting the array index and by providing a function to retrieve error messages rather than accessing the array directly. The function includes a bounds check that prevents the array from being overrun. Link: https://lore.kernel.org/linux-arm-kernel/38d00022-730c-948a-917c-d86382df8cb9@canonical.com/ Link: https://lore.kernel.org/r/20200822205000.15841-1-mmayer@broadcom.com Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE") Reported-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Markus Mayer <mmayer@broadcom.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Diffstat (limited to 'drivers/memory/omap-gpmc.c')
0 files changed, 0 insertions, 0 deletions