Commit f1ebe507 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Tong Tiangen
Browse files

memory: fsl_ifc: fix leak of IO mapping on probe failure

stable inclusion
from stable-v4.19.198
commit 94bc2fe46102d1e060fc749c0c19511e76c9995f
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9RKXC
CVE: CVE-2021-47315

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=94bc2fe46102d1e060fc749c0c19511e76c9995f



--------------------------------

[ Upstream commit 3b132ab6 ]

On probe error the driver should unmap the IO memory.  Smatch reports:

  drivers/memory/fsl_ifc.c:298 fsl_ifc_ctrl_probe() warn: 'fsl_ifc_ctrl_dev->gregs' not released on lines: 298.

Fixes: a20cbdef ("powerpc/fsl: Add support for Integrated Flash Controller")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210527154322.81253-1-krzysztof.kozlowski@canonical.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarTong Tiangen <tongtiangen@huawei.com>
parent 23ae7e1b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment