linux/drivers/isdn/i4l
Xiaotian Feng 2bd9af046f isdn: fix possible circular locking dependency
There's a circular locking dependency:

---> isdn_net_get_locked_lp
    --->lock &nd->queue_lock
    --->lock &nd->queue->xmit_lock
    .....................
    ---->unlock &nd->queue_lock

---> isdn_net_writebuf_skb (called with &nd->queue->xmit_lock locked)
    ---->isdn_net_inc_frame_cnt
         ---->isdn_net_device_busy
              ----> lock &nd->queue_lock

This will trigger lockdep warnings:

 =======================================================
 [ INFO: possible circular locking dependency detected ]
 2.6.32-rc4-testing #7
 -------------------------------------------------------
 ipppd/28379 is trying to acquire lock:
 (&netdev->queue_lock){......}, at: [<e62ad0fd>] isdn_net_device_busy+0x2c/0x74 [isdn]

 but task is already holding lock:
 (&netdev->local->xmit_lock){+.....}, at: [<e62aefc2>] isdn_net_write_super+0x3f/0x6e [isdn]

 which lock already depends on the new lock.
 .......

 We don't need to lock nd->queue->xmit_lock to protect single
isdn_net_lp_busy(). This can fix above lockdep warnings.

Reported-and-tested-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Xiaotian Feng <xtfeng@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-22 18:27:53 -07:00
..
isdn_audio.c [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
isdn_audio.h
isdn_bsdcomp.c [ISDN]: Get rid of some pointless allocation casts in common and bsd comp. 2007-08-26 18:35:46 -07:00
isdn_common.c trivial: fix typo "for for" in multiple files 2009-09-21 15:14:54 +02:00
isdn_common.h
isdn_concap.c isdn: Kill directly reference of netdev->priv 2008-12-03 15:49:46 -08:00
isdn_concap.h
isdn_net.c isdn: convert to netdev_tx_t 2009-09-01 01:13:16 -07:00
isdn_net.h isdn: fix possible circular locking dependency 2009-10-22 18:27:53 -07:00
isdn_ppp.c net: convert remaining non-symbolic return values in ndo_start_xmit() functions 2009-07-05 19:23:38 -07:00
isdn_ppp.h
isdn_tty.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
isdn_tty.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
isdn_ttyfax.c drivers/isdn: correct use of ! and & 2008-03-04 16:35:16 -08:00
isdn_ttyfax.h
isdn_v110.c isdn: replace __inline with inline 2008-03-05 18:37:39 -08:00
isdn_v110.h
isdn_x25iface.c [PATCH] SKB leak in drivers/isdn/i4l/isdn_x25iface.c 2006-06-29 10:26:21 -07:00
isdn_x25iface.h
isdnhdlc.c ISDN: Fix isdnhdlc for one byte hdlc packets 2009-07-25 20:16:17 +02:00
Kconfig isdn: fix netjet/isdnhdlc build errors 2009-09-28 12:47:36 -07:00
Makefile ISDN: Make isdnhdlc usable for other ISDN drivers 2009-07-25 20:15:21 +02:00