irq: action setting before irq_startup
PATCH 1/1 irq: action setting before irq_startup
In non shared and non threaded IRQ case. irq_startup calling before desc->action initialize.
Signed-off-by Yoshinori Sato <[email protected]>
--- kernel/irq/manage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/irq/manage.c +2 -2
@@ -1272,6 +1272,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) goto out_mask; } + *old_ptr = new; +if (!shared) { ret =irq_request_resources (desc);if (ret) {
@@ -1328,8 +1330,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) irq, nmsk, omsk); } - *old_ptr = new; -irq_pm_install_action (desc, new);/* Reset broken irq detection when installing new handler */
Signature · 1 line
2.6.1
Quoted 2 lines · Yoshinori Sato
In non shared and non threaded IRQ case.
irq_startupcalling beforedesc->actioninitialize.
And how does that matter?
Quoted 10 lines
Signed-off-by Yoshinori Sato <[email protected]>--- kernel/irq/manage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)kernel/irq/manage.c +0
-0
kernel/irq/manage.c __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) · line 1279
Quoted 8 lines
kernel/irq/manage.c +2
-0@@ -1272,6 +1272,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) goto out_mask; } + *old_ptr = new; +if (!shared) { ret =irq_request_resources (desc);if (ret) {
So in case irq_request_resources() fails, you leak the action in the irq descriptor.
Again, what's the problem you are trying to solve?
Thanks,
tglx