linux/drivers/s390/net
Stefan Raspl 2efaf5ff7f qeth: fix deadlock between recovery and bonding driver
The recovery thread, when failing, tears down the respective interface. To do
so, it needs to obtain the rtnl lock first, as the interface configuration is
changed.
If another process tries to modify an interface setting at the same time, that
process can obtain the rtnl lock first, but the respective callback in the qeth
driver will block until recovery has completed - which cannot happen since the
calling process already obtained it.
In one particular case, the bonding driver acquired the rtnl lock to modify the
card's MAC address, while the recovery failed at the same time due to the card
being removed. Hence qeth_l2_set_mac_address (implicitly holding the rtnl lock)
was waiting on qeth_l2_recover, which deadlocked when waiting on the rtnl lock.
This patch uses rtnl_trylock instead of rtnl_lock in the recovery thread. If the
lock cannot be obtained, the interface will be left up, but the card state
remains in CARD_STATE_RECOVER, which will prevent any further activities on the
card.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-16 14:41:46 -04:00
..
Kconfig s390: delete any traces of token ring support 2012-05-15 20:08:21 -04:00
Makefile [S390] smsgiucv_app: deliver z/VM CP special messages (SMSG) as uevents 2010-03-08 12:26:28 +01:00
claw.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
claw.h claw: rename READ/WRITE defines to avoid redefinitions 2010-08-12 16:04:22 -07:00
ctcm_dbug.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
ctcm_dbug.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
ctcm_fsms.c drivers/s390/net: removes unnecessary semicolon 2012-09-24 15:45:17 -04:00
ctcm_fsms.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
ctcm_main.c ctcm: fix error return code 2012-09-24 15:45:18 -04:00
ctcm_main.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
ctcm_mpc.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
ctcm_mpc.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
ctcm_sysfs.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
fsm.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
fsm.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
lcs.c lcs: ensure proper ccw setup 2012-09-24 15:45:17 -04:00
lcs.h s390: remove cu3088 layer for lcs and ctcm 2009-11-13 20:47:00 -08:00
netiucv.c netiucv: cleanup attribute usage 2012-07-25 15:24:13 -07:00
qeth_core.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
qeth_core_main.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00
qeth_core_mpc.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
qeth_core_mpc.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
qeth_core_sys.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
qeth_l2_main.c qeth: fix deadlock between recovery and bonding driver 2012-10-16 14:41:46 -04:00
qeth_l3.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
qeth_l3_main.c qeth: fix deadlock between recovery and bonding driver 2012-10-16 14:41:46 -04:00
qeth_l3_sys.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
smsgiucv.c smsgiucv: reestablish IUCV path after resume 2012-10-16 14:41:46 -04:00
smsgiucv.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
smsgiucv_app.c Driver core: driver_find() drops reference before returning 2012-01-24 16:00:34 -08:00