linux/drivers/net/hyperv
stephen hemminger 7874b21a45 netvsc: fix deadlock betwen link status and removal
commit 9b4e946ce1 upstream.

There is a deadlock possible when canceling the link status
delayed work queue. The removal process is run with RTNL held,
and the link status callback is acquring RTNL.

Resolve the issue by using trylock and rescheduling.
If cancel is in process, that block it from happening.

Fixes: 122a5f6410 ("staging: hv: use delayed_work for netvsc_send_garp()")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.16:
 - Move assignment of ndev_ctx before this new use
 - LINKCHANGE_INT is not defined; substitute its upstream definition]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2017-11-11 13:33:27 +00:00
..
hyperv_net.h hyperv: Add hash value into RNDIS Per-packet info 2014-05-23 14:49:00 -04:00
Kconfig staging: hv: move hv_netvsc out of staging area 2011-11-29 16:12:36 +09:00
Makefile staging: hv: move hv_netvsc out of staging area 2011-11-29 16:12:36 +09:00
netvsc.c hyperv: Fix the error processing in netvsc_send() 2015-02-10 13:38:51 +00:00
netvsc_drv.c netvsc: fix deadlock betwen link status and removal 2017-11-11 13:33:27 +00:00
rndis_filter.c hyperv: Simplify the send_completion variables 2014-04-23 14:48:39 -04:00