public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Zwane Mwaikambo <zwane@linuxpower.ca>
Cc: Andrew Morton <akpm@digeo.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] protect 'action' in show_interrupts
Date: Fri, 7 Mar 2003 15:46:43 +0000	[thread overview]
Message-ID: <20030307154643.L17492@flint.arm.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.50.0303071030500.18716-100000@montezuma.mastecende.com>; from zwane@linuxpower.ca on Fri, Mar 07, 2003 at 10:32:13AM -0500

On Fri, Mar 07, 2003 at 10:32:13AM -0500, Zwane Mwaikambo wrote:
> --- linux-2.5.64/arch/arm/kernel/irq.c	5 Mar 2003 05:08:11 -0000	1.1.1.1
> +++ linux-2.5.64/arch/arm/kernel/irq.c	7 Mar 2003 15:05:36 -0000
> @@ -165,17 +165,22 @@
>  {
>  	int i;
>  	struct irqaction * action;
> +	unsigned long flags;
>  
>  	for (i = 0 ; i < NR_IRQS ; i++) {
> +		spin_lock_irqsave(&irq_desc[i].lock, flags);
>  	    	action = irq_desc[i].action;
>  		if (!action)
> -			continue;
> +			goto unlock;
> +
>  		seq_printf(p, "%3d: %10u ", i, kstat_irqs(i));
>  		seq_printf(p, "  %s", action->name);
> -		for (action = action->next; action; action = action->next) {
> +		for (action = action->next; action; action = action->next)
>  			seq_printf(p, ", %s", action->name);
> -		}
> +
>  		seq_putc(p, '\n');
> +unlock:
> +		spin_unlock_irqrestore(&irq_desc[i].lock, flags);
>  	}
>  
>  #ifdef CONFIG_ARCH_ACORN

We don't have a per-irq_desc spinlock on ARM - it's a global
irq_controller_lock.

Thanks.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


  reply	other threads:[~2003-03-07 15:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-07  5:13 Oops: 2.5.64 check_obj_poison for 'size-64' Zwane Mwaikambo
2003-03-07  6:23 ` Andrew Morton
2003-03-07  7:22   ` Zwane Mwaikambo
2003-03-07  7:35     ` Andrew Morton
2003-03-07  7:40       ` Zwane Mwaikambo
2003-03-07  7:45       ` Miles Bader
2003-03-07  7:58         ` Andrew Morton
2003-03-07  8:10           ` Miles Bader
     [not found]       ` <Pine.LNX.4.50.0303070351060.18716-100000@montezuma.mastecende.com>
     [not found]         ` <20030307010539.3c0a14a3.akpm@digeo.com>
2003-03-07  9:53           ` Zwane Mwaikambo
2003-03-07 19:38           ` Manfred Spraul
2003-03-07 21:57             ` Zwane Mwaikambo
2003-03-08  2:11               ` Zwane Mwaikambo
2003-03-08  2:24                 ` Andrew Morton
2003-03-08  2:42                   ` Zwane Mwaikambo
2003-03-07 10:05       ` [PATCH] protect 'action' in show_interrupts Zwane Mwaikambo
2003-03-07 10:28         ` Andrew Morton
2003-03-07 15:32           ` Zwane Mwaikambo
2003-03-07 15:46             ` Russell King [this message]
2003-03-07 16:25               ` Zwane Mwaikambo
2003-03-07 22:01                 ` Andrew Morton

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=20030307154643.L17492@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zwane@linuxpower.ca \
    /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