|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/arm: setup_dt_irq: don't enable the IRQ if the creation has failed
commit 2cf484cee084be71b1f63e718d76af7555a6ab14
Author: Julien Grall <julien.grall@xxxxxxxxxx>
AuthorDate: Fri Jan 24 16:43:36 2014 +0000
Commit: Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Wed Mar 12 13:48:33 2014 +0000
xen/arm: setup_dt_irq: don't enable the IRQ if the creation has failed
For now __setup_dt_irq can only fail if the action is already set. If in the
future, the function is updated we don't want to enable the IRQ.
Assuming the function can fail with action = NULL, when Xen will receive the
IRQ it will segfault because do_IRQ doesn't check if action is NULL.
Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
xen/arch/arm/gic.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index a607da3..d028e30 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -608,8 +608,8 @@ int __init setup_dt_irq(const struct dt_irq *irq, struct
irqaction *new)
rc = __setup_irq(desc, irq->irq, new);
spin_unlock_irqrestore(&desc->lock, flags);
- desc->handler->startup(desc);
-
+ if ( !rc )
+ desc->handler->startup(desc);
return rc;
}
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |