]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/net: caif: fix wrong rtnl_is_locked() usage
authorKonstantin Khlebnikov <khlebnikov@openvz.org>
Mon, 8 Jul 2013 07:23:04 +0000 (11:23 +0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Jul 2013 19:55:48 +0000 (12:55 -0700)
commit7934afc33478af7627c2a852d4f1d67a112f7421
tree3d9bc5ce1b6086554982703f99bc6a0bb9ce05e1
parent79fff378f2b91196d89b4babb0277d0ef89ea010
drivers/net: caif: fix wrong rtnl_is_locked() usage

rtnl_is_locked() doesn't check who holds this lock, it just tells that it's
locked right now. if caif::ldisc_close really can be called under rtrnl_lock
then it should release net device in other context because there is no way
to grab rtnl_lock without deadlock.

This patch adds work which releases these devices. Also this patch fixes calling
dev_close/unregister_netdevice without rtnl_lock from caif_ser_exit().

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/caif/caif_serial.c