From: Andrew Morton <akpm@linux-foundation.org>
To: "Hennerich, Michael" <Michael.Hennerich@analog.com>
Cc: <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: linux/kernel/irq/chip.c IRQ disable, shutdown bug
Date: Sat, 23 Feb 2008 00:07:17 -0800 [thread overview]
Message-ID: <20080223000717.3ed3a4c1.akpm@linux-foundation.org> (raw)
In-Reply-To: <600D5CB4DFD93545BF61FF01473D11AC124E5D34@limkexm2.ad.analog.com>
On Fri, 15 Feb 2008 14:10:18 -0000 "Hennerich, Michael" <Michael.Hennerich@analog.com> wrote:
> free_irq() does not disable/mask the irq, in case disable or shutdown in struct irq_chip is left uninitilazied.
>
> /**
> * struct irq_chip - hardware interrupt chip descriptor
> *
> * @name: name for /proc/interrupts
> * @startup: start up the interrupt (defaults to ->enable if NULL)
> * @shutdown: shut down the interrupt (defaults to ->disable if NULL)
> * @enable: enable the interrupt (defaults to chip->unmask if NULL)
> * @disable: disable the interrupt (defaults to chip->mask if NULL)
>
>
> According to linux/irq.h struct irq_chip information,
> chip->disable should default to chip->mask if NULL.
> However irq_chip_set_defaults(struct irq_chip *chip) will set it to default_disable a empty function.
>
>
> Looking through various architectures, it's pretty common that disable and shutdown is NULL.
> So this bug affects many architectures.
>
> This patch fixes the issue.
>
Please send a Signed-off-by: for this work, as per
Documentation/SubmittingPatches, thanks.
> Index: irq/chip.c
> ===================================================================
> --- irq/chip.c (revision 4276)
> +++ irq/chip.c (working copy)
Please prepare future patches in `patch -p1' form. This should have been
> --- a/kernel/irq/chip.c
> +++ a/kernel/irq/chip.c
> @@ -233,6 +233,10 @@
> */
> static void default_disable(unsigned int irq)
> {
> + struct irq_desc *desc = irq_desc + irq;
> +
> + desc->chip->mask(irq);
> + desc->status |= IRQ_MASKED;
> }
>
> /*
Ingo, Thomas: ack?
next prev parent reply other threads:[~2008-02-23 8:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-15 14:10 Hennerich, Michael
2008-02-23 8:07 ` Andrew Morton [this message]
2008-02-23 10:13 ` Ingo Molnar
2008-02-23 17:51 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080223000717.3ed3a4c1.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=Michael.Hennerich@analog.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®