]> git.baikalelectronics.ru Git - kernel.git/commit
r8169: fix lockdep warning when removing interface
authorLekensteyn <lekensteyn@gmail.com>
Mon, 22 Jul 2013 07:53:30 +0000 (09:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jul 2013 22:42:59 +0000 (15:42 -0700)
commitbf45edeb06a5fa4db3fe9244c96968a55b058243
tree93d3f2ac1c2284447a390cf5ffe71f13672addcb
parentd07b43a8253f1fd74fdd0165e38f56edc4949ce1
r8169: fix lockdep warning when removing interface

The work queue is initialised in rtl_open (when the interface goes up),
but canceled in rtl_remove_one (when the PCI device gets removed). If
the network interface is not brought up, then the work queue struct is
not initialised. When the device is removed, the attempt to cancel the
uninitialised work queue causes a lockdep warning.

This patch fixes the issue by moving cancel_work_sync to rtl_close (to
match rtl_open). (Note that rtl_close is also called via
unregister_netdev in rtl_remove_one.)

Signed-off-by: Peter Wu <lekensteyn@gmail.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c