From: Andrew Morton <akpm@linux-foundation.org>
To: Matt Mackall <mpm@selenic.com>
Cc: rlove@rlove.org, linux-kernel@vger.kernel.org,
Ingo Molnar <mingo@elte.hu>, Dmitry Torokhov <dtor@mail.ru>
Subject: Re: 2.6.21-mm2: HDAPS? BUG: at kernel/mutex.c:311
Date: Fri, 11 May 2007 17:53:35 -0700 [thread overview]
Message-ID: <20070511175335.092aa0af.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070512002115.GZ11166@waste.org>
On Fri, 11 May 2007 19:21:15 -0500
Matt Mackall <mpm@selenic.com> wrote:
> This just hit:
>
> [ 7.856000] usbcore: registered new interface driver usbhid
> [ 7.860000] BUG: at kernel/mutex.c:311 __mutex_trylock_slowpath()
> [ 7.868000] [<c0104584>] show_trace_log_lvl+0x1a/0x30
> [ 7.872000] [<c0105196>] show_trace+0x12/0x14
> [ 7.876000] [<c0105222>] dump_stack+0x15/0x17
> [ 7.880000] [<c03cd4c8>] mutex_trylock+0x56/0x15a
> [ 7.888000] [<c03172c5>] hdaps_mousedev_poll+0x10/0xcb
> [ 7.892000] [<c011f8c5>] run_timer_softirq+0x10e/0x16f
> [ 7.896000] [<c011cabc>] __do_softirq+0x5d/0xc0
> [ 7.900000] [<c0105c88>] do_softirq+0x6e/0xf0
> [ 7.904000] [<c011ca22>] irq_exit+0x3e/0x7b
> [ 7.912000] [<c0105da7>] do_IRQ+0x9d/0xb2
> [ 7.916000] [<c01040fa>] common_interrupt+0x2e/0x34
> [ 7.920000] [<c0118e5f>] printk+0x1b/0x1d
> [ 7.924000] [<c02f2f96>] usb_register_driver+0xa0/0xe5
> [ 7.928000] [<c0525018>] hid_init+0x28/0x51
> [ 7.932000] [<c050e6c4>] kernel_init+0xbc/0x23e
> [ 7.940000] [<c010420f>] kernel_thread_helper+0x7/0x10
> [ 7.944000] =======================
> [ 7.948000] drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
>
> Looks like it's triggered by the HDAPS driver.
>
It's complaining about a mutex_trylock() being run from irq context.
And indeed that's buggy - the non-debug version of spin_lock_mutex() is not
irq-safe.
I'd say that's pretty dumb of the mutex interface, really. Doing a
mutex_trylock() should be OK from all contexts.
This is caused by a recent semaphore->mutex conversion and it's in mainline
now.
Ho hum. I suppose a suitable workaround would be to convert hdaps_mtx back
into a semaphore. ug.
next prev parent reply other threads:[~2007-05-12 0:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-12 0:21 2.6.21-mm2: HDAPS? BUG: at kernel/mutex.c:311 Matt Mackall
2007-05-12 0:53 ` Andrew Morton [this message]
2007-05-12 1:17 ` Andrew Morton
2007-05-12 5:12 ` Dmitry Torokhov
2007-05-12 5:45 ` Satyam Sharma
2007-05-14 2:57 ` Dmitry Torokhov
2007-05-14 3:40 ` Satyam Sharma
2007-05-26 20:43 ` Cédric Augonnet
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=20070511175335.092aa0af.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dtor@mail.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mpm@selenic.com \
--cc=rlove@rlove.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.