Re: kernel BUG at /usr/src/linux-2.5.37/include/asm/spinlock.h:123!

Mika Liljeberg (Mika.Liljeberg@welho.com)
23 Sep 2002 21:11:53 +0300


On Mon, 2002-09-23 at 18:41, Bob Miller wrote:
> Mika,

Hi Bob,

> I haven't looked at the code yet... but most of the time when you see this
> error it is because the kernel is compiled with CONFIG_DEBUG_SPINLOCK and
> the code is using a lock that hasn't be initilized correctly (i.e.:
> SPIN_LOCK_UNLOCKED().

Yup. I usually compile new kernels with spinlock debugging.

Looks like a number of the ioctls in oss/audio.c have locking problems.
At least the following ones look buggy:

SNDCTL_DSP_SETTRIGGER
SNDCTL_DSP_GETIPTR
SNDCTL_DSP_GETOPTR
SNDCTL_DSP_GETODELAY

Each of these tries to manipulate a spinlock through the uninitialized
dmap pointer. SNDCTL_DSP_SETTRIGGER actually operates on both dmap_in
and dmap_out. It should presumably acquire locks for both.

Looks like a copy/paste error, probably a result of a hasty conversion
cli()/sti()'s to spinlocks.

Regards,

MikaL

>
> --
> Bob Miller Email: rem@osdl.org
> Open Source Development Lab Phone: 503.626.2455 Ext. 17

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/