* [PATCH] irq: action setting before irq_startup
@ 2016-01-09 11:58 Yoshinori Sato
2016-01-10 10:13 ` Thomas Gleixner
0 siblings, 1 reply; 2+ messages in thread
From: Yoshinori Sato @ 2016-01-09 11:58 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: Yoshinori Sato, linux-kernel
In non shared and non threaded IRQ case.
irq_startup calling before desc->action initialize.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
kernel/irq/manage.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 0eebaee..f6cdb63 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -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 */
--
2.6.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] irq: action setting before irq_startup
2016-01-09 11:58 [PATCH] irq: action setting before irq_startup Yoshinori Sato
@ 2016-01-10 10:13 ` Thomas Gleixner
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2016-01-10 10:13 UTC (permalink / raw)
To: Yoshinori Sato; +Cc: linux-kernel
On Sat, 9 Jan 2016, Yoshinori Sato wrote:
> In non shared and non threaded IRQ case.
> irq_startup calling before desc->action initialize.
And how does that matter?
> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
> ---
> kernel/irq/manage.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index 0eebaee..f6cdb63 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-10 10:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-09 11:58 [PATCH] irq: action setting before irq_startup Yoshinori Sato
2016-01-10 10:13 ` Thomas Gleixner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.