mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: tglx@linutronix.de, yinghai@kernel.org, rusty@rustcorp.com.au,
	hpa@zytor.com, ebiederm@xmission.com, garyhade@us.ibm.com,
	lcm@us.ibm.com, venkatesh.pallipadi@intel.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] irq: correct CPUMASKS_OFFSTACK typo -v2
Date: Wed, 15 Apr 2009 12:17:38 -0700	[thread overview]
Message-ID: <20090415121738.8d1d750c.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090415100105.GC6669@elte.hu>

On Wed, 15 Apr 2009 12:01:05 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> 
> * Andrew Morton <akpm@linux-foundation.org> wrote:
> 
> > On Tue, 14 Apr 2009 13:41:55 -0700
> > Yinghai Lu <yinghai@kernel.org> wrote:
> > 
> > > irq
> > 
> > Speaking of which, could someone please take a look at
> > http://www.gossamer-threads.com/lists/linux/kernel/1060580?do=post_view_threaded#1060580
> > ?
> [...]
> 
> > But try_one_irq() is running tifm_7xx1_isr() with local interrupts 
> > enabled, which upsets lockdep.
> 
> It doesnt just upset lockdep, it could also cause real lockups. 

Only if the interrupt were to magically come back to life, then
trigger.  I think.  Possibly in the case of shared interrupts we'd lock
up because of an interrupt from another device.

> Lockdep is just the canary, the lockup is the methane explosion.
> 
> > But I suspect that the code as it stands is non-buggy. Unless the 
> > interrupt can magically come back to life. In which case any 
> > change we make is purely a make-lockdep-shut-up thing.
> 
> Hm, i'd suggest we go for the methane leak instead of squashing the 
> canary. Which in this case would be try_one_irq() ignoring 
> IRQF_DISABLED or so? Affecting (much) more ISRs than just 
> tifm_7xx1_isr()?

tifm_7xx1_isr() is requested with bare IRQF_SHARED, so that function is
supposed to be called with local interrupts enabled.

And indeed, try_one_irq() is calling it with local interrupts enabled. 
That gets lockdep upset.  I assume there's magic in lockdep somewhere
which recognises the case where a function is called in hard irq
context with local interrupts enabled and, knowing that the controller
won't generate another interrupt, treats this as
local-interrupt-disabled.  Or something.

I don't know how to fix this really.  We _could_ fudge it by disabling
local interrupts in try_one_irq().  But the ISR could legitimately do
(say) spin_unlock_irq() and muck everything up.


      reply	other threads:[~2009-04-15 19:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200903231757.53709.rusty@rustcorp.com.au>
     [not found] ` <20090323165921.GA7559@us.ibm.com>
     [not found]   ` <200903241553.58209.rusty@rustcorp.com.au>
     [not found]     ` <20090402013108.GB7103@us.ibm.com>
     [not found]       ` <20090404003520.GA8847@us.ibm.com>
     [not found]         ` <20090410215515.GC7242@us.ibm.com>
     [not found]           ` <20090411065510.GA11799@elte.hu>
     [not found]             ` <20090413220321.GA11098@us.ibm.com>
     [not found]               ` <49E4146C.7060507@kernel.org>
     [not found]                 ` <49E4162A.3060701@kernel.org>
     [not found]                   ` <20090414131711.GA4403@elte.hu>
2009-04-14 20:41                     ` Yinghai Lu
2009-04-14 20:42                       ` [PATCH 2/4] irq: make set_affinity to return status Yinghai Lu
2009-04-15  3:27                         ` Rusty Russell
2009-04-15  5:44                         ` [PATCH 2/4] irq: make set_affinity to return status -v2 Yinghai Lu
2009-04-14 20:43                       ` [PATCH 3/4] irq: only update affinity in chip set_affinity() -v3 Yinghai Lu
2009-04-14 20:44                       ` [PATCH 4/4] irq: move move_irq_desc calling to set_affinity directly -v4 Yinghai Lu
2009-04-14 22:03                         ` Suresh Siddha
2009-04-14 20:59                       ` [PATCH 1/4] irq: correct CPUMASKS_OFFSTACK typo -v2 Andrew Morton
2009-04-15 10:01                         ` Ingo Molnar
2009-04-15 19:17                           ` Andrew Morton [this message]

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=20090415121738.8d1d750c.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=garyhade@us.ibm.com \
    --cc=hpa@zytor.com \
    --cc=lcm@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@intel.com \
    --cc=yinghai@kernel.org \
    /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

Powered by JetHome