[PATCH] of/irq: Make sure to update out_irq->np to the new parent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit 935df1bd40d43c4ee91838c42a20e9af751885cc has removed an
assignment statement for 'out_irq->np' right after label 'skiplevel',
causing the new parent acquired from function of_irq_find_parent didn't
being stored to 'out_irq->np' as it supposed to. Under some conditions
this can resuit in multiple corruptions and leakages to device nodes.

Update 'out_irq->np' before jumping to label 'skiplevel'.

Signed-off-by: WHR <whr@xxxxxxxxxxx>
---
 drivers/of/irq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index c94203ce65bb..580b33ce60d2 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -263,6 +263,7 @@ int of_irq_parse_raw(const __be32 *addr, struct
of_phandle_args *out_irq)
 		if (imap == NULL) {
 			pr_debug(" -> no map, getting parent\n");
 			newpar = of_irq_find_parent(ipar);
+			out_irq->np = newpar;
 			goto skiplevel;
 		}
 		imaplen /= sizeof(u32);
-- 
2.30.2






[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux