* [PATCH] kernel/irq/irqdomain.c: before use 'irq_data', need check it whether valid.
@ 2013-05-14 11:02 Chen Gang
2013-06-05 22:41 ` Grant Likely
0 siblings, 1 reply; 3+ messages in thread
From: Chen Gang @ 2013-05-14 11:02 UTC (permalink / raw)
To: Benjamin Herrenschmidt, grant.likely, Thomas Gleixner
Cc: linux-kernel@vger.kernel.org
Since irq_data may be NULL, if so, we WARN_ON(), and continue, 'hwirq'
which related with 'irq_data' has to initialize later, or it will cause
issue.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
kernel/irq/irqdomain.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index af804b5..61abbfa 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -400,11 +400,12 @@ static void irq_domain_disassociate_many(struct irq_domain *domain,
while (count--) {
int irq = irq_base + count;
struct irq_data *irq_data = irq_get_irq_data(irq);
- irq_hw_number_t hwirq = irq_data->hwirq;
+ irq_hw_number_t hwirq;
if (WARN_ON(!irq_data || irq_data->domain != domain))
continue;
+ hwirq = irq_data->hwirq;
irq_set_status_flags(irq, IRQ_NOREQUEST);
/* remove chip and handler */
--
1.7.7.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kernel/irq/irqdomain.c: before use 'irq_data', need check it whether valid.
2013-05-14 11:02 [PATCH] kernel/irq/irqdomain.c: before use 'irq_data', need check it whether valid Chen Gang
@ 2013-06-05 22:41 ` Grant Likely
2013-06-06 8:39 ` Chen Gang
0 siblings, 1 reply; 3+ messages in thread
From: Grant Likely @ 2013-06-05 22:41 UTC (permalink / raw)
To: Chen Gang, Benjamin Herrenschmidt, Thomas Gleixner
Cc: linux-kernel@vger.kernel.org
On Tue, 14 May 2013 19:02:45 +0800, Chen Gang <gang.chen@asianux.com> wrote:
>
> Since irq_data may be NULL, if so, we WARN_ON(), and continue, 'hwirq'
> which related with 'irq_data' has to initialize later, or it will cause
> issue.
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
Applied, thanks.
g.
> ---
> kernel/irq/irqdomain.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index af804b5..61abbfa 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -400,11 +400,12 @@ static void irq_domain_disassociate_many(struct irq_domain *domain,
> while (count--) {
> int irq = irq_base + count;
> struct irq_data *irq_data = irq_get_irq_data(irq);
> - irq_hw_number_t hwirq = irq_data->hwirq;
> + irq_hw_number_t hwirq;
>
> if (WARN_ON(!irq_data || irq_data->domain != domain))
> continue;
>
> + hwirq = irq_data->hwirq;
> irq_set_status_flags(irq, IRQ_NOREQUEST);
>
> /* remove chip and handler */
> --
> 1.7.7.6
--
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kernel/irq/irqdomain.c: before use 'irq_data', need check it whether valid.
2013-06-05 22:41 ` Grant Likely
@ 2013-06-06 8:39 ` Chen Gang
0 siblings, 0 replies; 3+ messages in thread
From: Chen Gang @ 2013-06-06 8:39 UTC (permalink / raw)
To: Grant Likely
Cc: Benjamin Herrenschmidt, Thomas Gleixner,
linux-kernel@vger.kernel.org
On 06/06/2013 06:41 AM, Grant Likely wrote:
> On Tue, 14 May 2013 19:02:45 +0800, Chen Gang <gang.chen@asianux.com> wrote:
>> >
>> > Since irq_data may be NULL, if so, we WARN_ON(), and continue, 'hwirq'
>> > which related with 'irq_data' has to initialize later, or it will cause
>> > issue.
>> >
>> > Signed-off-by: Chen Gang <gang.chen@asianux.com>
> Applied, thanks.
Thank you too.
--
Chen Gang
Asianux Corporation
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-06 8:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-14 11:02 [PATCH] kernel/irq/irqdomain.c: before use 'irq_data', need check it whether valid Chen Gang
2013-06-05 22:41 ` Grant Likely
2013-06-06 8:39 ` Chen Gang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox