Skip to content

Commit

Permalink
hv_netvsc: cancel subchannel setup before halting device
Browse files Browse the repository at this point in the history
Block setup of multiple channels earlier in the teardown
process. This avoids possible races between halt and subchannel
initialization.

Suggested-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Mar 5, 2018
1 parent fcfb4a0 commit a7483ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/hyperv/rndis_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,9 @@ void rndis_filter_device_remove(struct hv_device *dev,
{
struct rndis_device *rndis_dev = net_dev->extension;

/* Don't try and setup sub channels if about to halt */
cancel_work_sync(&net_dev->subchan_work);

/* Halt and release the rndis device */
rndis_filter_halt_device(rndis_dev);

Expand Down

0 comments on commit a7483ec

Please sign in to comment.