ARM: mvebu: Fix kernel hang in mvebu_soc_id_init() when of_iomap failed
Subsystems (3)
PATCH 1/1 ARM: mvebu: Fix kernel hang in mvebu_soc_id_init() when of_iomap failed
When pci_base is accessed whereas it has not been properly mapped by of_iomap() the kernel hang. The check of this pointer made an improper use of IS_ERR() instead of comparing to NULL. This patch fix this issue.
---
Jason,
As this is a fix on a fix which should be ported to the stable branch, I don't know how to handle the cc:stable flag
arch/arm/mach-mvebu/mvebu-soc-id.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-mvebu/mvebu-soc-id.c +1 -1
@@ -88,7 +88,7 @@ static int __init mvebu_soc_id_init(void) } pci_base =of_iomap (child,0 ); -if (IS_ERR (pci_base)) { +if (pci_base ==NULL ) {pr_err ("cannot map registers\n" ); ret = -ENOMEM ; goto res_ioremap;
Signature · 1 line
1.8.1.2
Jason Cooper
AppliedPATCH 1/1 ARM: mvebu: Fix kernel hang in mvebu_soc_id_init() when of_iomap failed
Quoted 5 lines · Gregory CLEMENT
When
pci_baseis accessed whereas it has not been properly mapped byof_iomap()the kernel hang. The check of this pointer made an improper use ofIS_ERR()instead of comparing to NULL. This patch fix this issue.
Quoted 7 lines
Signed-off-by Gregory CLEMENT <[email protected]>Reported-by Ezequiel Garcia <[email protected]>---
Jason,As this is a fix on a fix which should be ported to the stable branch, I don't know how to handle the cc:stable flag
No problem, I added it.
Quoted 2 lines
arch/arm/mach-mvebu/mvebu-soc-id.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to mvebu/fixes.
thx,
Jason.