Re: BUG: sleeping function called from invalid context atkernel/locking/mutex.c:616

From: Andrew Morton
Date: Thu Dec 05 2013 - 02:22:03 EST


On Thu, 05 Dec 2013 15:12:04 +0800 Axel Lin <axel.lin@xxxxxxxxxx> wrote:

> >
> > blam. spin_unlock_irq(&mapping->tree_lock) failed to decrement
> > preempt_count(). What the heck.
> >
> > What architecture is this? Please send the full .config.
> >
> > And exactly which kernel version is in use?
>
> It's a arm7tdmi SoC (GeneralPlus gpl32700 SoC).
> The code is: current Linus' tree + patches for this SoC.
> The patches for this SoC includes:
> irqchip, clocksource, pinctrl, gpio, uart, spi, sd/mmc host drivers.
> I also apply a out-of-tree sdio wifi driver for mt5931 wifi module.

Beats me, sorry - I don't see anything which could cause this in the
arm spinlock implementation, even if the spinlock's storage got
corrupted.

> I can successfully boot and running busybox if using ext2 as root.
> Thus I don't hit "spin_unlock_irq decrement preempt_count failure" if using ext2 as root.
> The storage is a spi nor flash, so I prefer to use jffs2 but then I got
> the hangup.
>
> BTW, I got below panic today:
>
> 467: 0
> 470: 0
> 475: 1
> 485: 1
> 487: 2
> 489: 2
> 491: 1
> 494: 1
> 496: 1
> 498: 1
> BUG: spinlock bad magic on CPU#0, spi0/30

Which is what appears to have happened here.

I assume earlier kernels worked OK with this config?

If so, all I can suggest is a git bisection search :(
--
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/