Re: [WARNING] local_bh_enable with irqs disabled:

From: Andrew Morton
Date: Thu Jun 12 2008 - 15:27:42 EST


On Thu, 12 Jun 2008 12:00:03 -0700
David Brownell <david-b@xxxxxxxxxxx> wrote:

> On Thursday 05 June 2008, you wrote:
> > On Fri, 6 Jun 2008 08:11:23 +0200 (CEST) Guennadi Liakhovetski <g.liakhovetski@xxxxxx> wrote:
> >
> > > > Which kernel version are you running?
> > >
> > > Sorry, this was a 2.6.26-rc3 based kernel with the gpio-sysfs patch from
> > > David, e.g., http://marc.info/?l=linux-kernel&m=121107105300923&w=2,
> > > which introduces a call to device_unregister via gpiochip_unexport(chip);
> > > in gpiochip_remove.
> >
> > OK, thanks.
> >
> > That's quite buggy and would have generated so many runtime warnings in
> > a "developer" setup (rofl) that I look at Documentation/SubmitChecklist
> > and just weep.
> >
> > I'll drop it.
>
> That seems excessive. I observe a locking bug with a trivial fix;
> happened because *one* code path (rmmod -- not often used with GPIOs
> once they work) couldn't be tested on most of my test rigs. It would
> produce *ONE* runtime warning on that code path.
>
> Other than missing one test case, the only other significant issue
> from SubmitChecklist is that the Documentation/ABI update needs to
> hold up until this merges to mainline, since one part of it includes
> the date where that interface became available.
>
> So ... what else were you thinking was trouble?
>

The patch had a great string of sysfs operations and mutex-takings all
happening under spinlock. Obviously all that code hadn't been tested.
I didn't take the time to sit down and analyse where it was all happening.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/