]> git.baikalelectronics.ru Git - kernel.git/commit
netvsc: fix rtnl deadlock on unregister of vf
authorstephen hemminger <stephen@networkplumber.org>
Fri, 4 Aug 2017 19:14:00 +0000 (12:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Aug 2017 04:28:10 +0000 (21:28 -0700)
commit1f55d3f28e616b9fea4d25e71dc553954aab12de
tree6a3deb9f2ce3a088a5467f75cc42447b8f3ae1ba
parentdd00f68a16766354340e25d7cf2e1ef8a82f79ef
netvsc: fix rtnl deadlock on unregister of vf

With new transparent VF support, it is possible to get a deadlock
when some of the deferred work is running and the unregister_vf
is trying to cancel the work element. The solution is to use
trylock and reschedule (similar to bonding and team device).

Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Fixes: 02e633075a17 ("netvsc: transparent VF management")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c