linux/net/irda
Peter Zijlstra 700f9672c9 [IRDA]: Lockdep fix.
On Sat, 2006-11-18 at 16:12 +0300, Andrey Borzenkov wrote:

> =============================================
> [ INFO: possible recursive locking detected ]
> 2.6.19-rc5-2avb #2
> - ---------------------------------------------
> pppd/26425 is trying to acquire lock:
>  (&hashbin->hb_spinlock){....}, at: [<dfdea87a>] irlmp_slsap_inuse+0x5a/0x170
> [irda]
>
> but task is already holding lock:
>  (&hashbin->hb_spinlock){....}, at: [<dfdea857>] irlmp_slsap_inuse+0x37/0x170
> [irda]
>
> other info that might help us debug this:
> 1 lock held by pppd/26425:
>  #0:  (&hashbin->hb_spinlock){....}, at: [<dfdea857>]
> irlmp_slsap_inuse+0x37/0x170 [irda]
>
> stack backtrace:
>  [<c010413c>] dump_trace+0x1cc/0x200
>  [<c010418a>] show_trace_log_lvl+0x1a/0x30
>  [<c01047f2>] show_trace+0x12/0x20
>  [<c01048c9>] dump_stack+0x19/0x20
>  [<c01346ca>] __lock_acquire+0x8fa/0xc20
>  [<c0134d2d>] lock_acquire+0x5d/0x80
>  [<c02a851c>] _spin_lock+0x2c/0x40
>  [<dfdea87a>] irlmp_slsap_inuse+0x5a/0x170 [irda]
>  [<dfdebab2>] irlmp_open_lsap+0x62/0x180 [irda]
>  [<dfdf35d1>] irttp_open_tsap+0x181/0x230 [irda]
>  [<dfdc0c3d>] ircomm_open_tsap+0x5d/0xa0 [ircomm]
>  [<dfdc05d8>] ircomm_open+0xb8/0xd0 [ircomm]
>  [<dfdd0477>] ircomm_tty_open+0x4f7/0x570 [ircomm_tty]
>  [<c020bbe4>] tty_open+0x174/0x340
>  [<c016bd69>] chrdev_open+0x89/0x170
>  [<c0167bd6>] __dentry_open+0xa6/0x1d0
>  [<c0167da5>] nameidata_to_filp+0x35/0x40
>  [<c0167df9>] do_filp_open+0x49/0x50
>  [<c0167e47>] do_sys_open+0x47/0xd0
>  [<c0167f0c>] sys_open+0x1c/0x20
>  [<c010307d>] sysenter_past_esp+0x56/0x8d
>  [<b7f86410>] 0xb7f86410
>  =======================

The comment at the nesting lock says:

	/* Careful for priority inversions here !
	 * irlmp->links is never taken while another IrDA
	 * spinlock is held, so we are safe. Jean II */

So, under the assumption the author was right, it just needs a lockdep
annotation.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-11-21 17:33:01 -08:00
..
ircomm [PATCH] const struct tty_operations 2006-10-02 07:57:14 -07:00
irlan [IrDA]: Memory allocations cleanups 2006-09-28 18:02:48 -07:00
irnet [NET]: Conversions from kmalloc+memset to k(z|c)alloc. 2006-07-21 14:51:30 -07:00
af_irda.c [IrDA]: Memory allocations cleanups 2006-09-28 18:02:48 -07:00
discovery.c [NET]: kfree cleanup 2005-11-08 09:41:34 -08:00
irda_device.c [NET]: Conversions from kmalloc+memset to k(z|c)alloc. 2006-07-21 14:51:30 -07:00
iriap_event.c [IrDA]: Memory allocations cleanups 2006-09-28 18:02:48 -07:00
iriap.c [IrDA]: Memory allocations cleanups 2006-09-28 18:02:48 -07:00
irias_object.c [PATCH] strndup() would better take size_t, not int 2006-10-10 15:37:24 -07:00
irlap_event.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
irlap_frame.c [IrDA]: Memory allocations cleanups 2006-09-28 18:02:48 -07:00
irlap.c [NET]: Conversions from kmalloc+memset to k(z|c)alloc. 2006-07-21 14:51:30 -07:00
irlmp_event.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
irlmp_frame.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
irlmp.c [IRDA]: Lockdep fix. 2006-11-21 17:33:01 -08:00
irmod.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
irproc.c
irqueue.c
irsysctl.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
irttp.c [IrDA]: Memory allocations cleanups 2006-09-28 18:02:48 -07:00
Kconfig
Makefile
parameters.c
qos.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
timer.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
wrapper.c