]> git.baikalelectronics.ru Git - kernel.git/commit
netvsc: fix deadlock betwen link status and removal
authorstephen hemminger <stephen@networkplumber.org>
Thu, 24 Aug 2017 23:49:16 +0000 (16:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Aug 2017 04:59:08 +0000 (21:59 -0700)
commit2a4c4dc04be6d28220aee3ff9a27f29d6e98ba32
tree0175bcaad416e1b058108ea515878d40ab63663c
parent557cdb0c61eeea0296e4635fa3ae9d293024e44e
netvsc: fix deadlock betwen link status and removal

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: b4bb8ee6db37 ("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>
drivers/net/hyperv/netvsc_drv.c