1
linux/drivers/net/hamradio
Arnd Bergmann 6e4e2f811b 6pack,mkiss: fix lock inconsistency
Lockdep found a locking inconsistency in the mkiss_close function:

> kernel: [ INFO: inconsistent lock state ]
> kernel: 2.6.39.1 #3
> kernel: ---------------------------------
> kernel: inconsistent {IN-SOFTIRQ-R} -> {SOFTIRQ-ON-W} usage.
> kernel: ax25ipd/2813 [HC0[0]:SC0[0]:HE1:SE1] takes:
> kernel: (disc_data_lock){+++?.-}, at: [<ffffffffa018552b>] mkiss_close+0x1b/0x90 [mkiss]
> kernel: {IN-SOFTIRQ-R} state was registered at:

The message hints that disc_data_lock is aquired with softirqs disabled,
but does not itself disable softirqs, which can in rare circumstances
lead to a deadlock. 
The same problem is present in the 6pack driver, this patch fixes both
by using write_lock_bh instead of write_lock.

Reported-by: Bernard F6BVP <f6bvp@free.fr>
Tested-by: Bernard F6BVP <f6bvp@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ralf Baechle<ralf@linux-mips.org>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-01 17:30:00 -07:00
..
6pack.c 6pack,mkiss: fix lock inconsistency 2011-07-01 17:30:00 -07:00
baycom_epp.c baycom: Drop __TIME__ usage 2011-05-25 17:21:03 +02:00
baycom_par.c baycom: Drop __TIME__ usage 2011-05-25 17:21:03 +02:00
baycom_ser_fdx.c baycom: Drop __TIME__ usage 2011-05-25 17:21:03 +02:00
baycom_ser_hdx.c baycom: Drop __TIME__ usage 2011-05-25 17:21:03 +02:00
bpqether.c net: call dev_alloc_name from register_netdevice 2011-05-05 10:57:45 -07:00
dmascc.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
hdlcdrv.c hdlcdrv: Drop __TIME__ usage 2011-05-25 17:21:33 +02:00
Kconfig Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
Makefile Fix common misspellings 2011-03-31 11:26:23 -03:00
mkiss.c 6pack,mkiss: fix lock inconsistency 2011-07-01 17:30:00 -07:00
scc.c drivers/net/hamradio: Adjust confusing if indentation 2010-08-16 21:06:29 -07:00
yam.c Fix common misspellings 2011-03-31 11:26:23 -03:00
z8530.h