diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2012-08-03 11:32:18 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-04 01:51:11 +0200 |
commit | ae9e63bb2c0cf5437d9d13d822b27149336c6e0e (patch) | |
tree | 208ca440bec48067d84fbd86f04fa79bb55d00c3 /drivers/net/hyperv/netvsc.c | |
parent | net/mlx4_core: Remove port type restrictions (diff) | |
download | linux-ae9e63bb2c0cf5437d9d13d822b27149336c6e0e.tar.xz linux-ae9e63bb2c0cf5437d9d13d822b27149336c6e0e.zip |
hyperv: Move wait completion msg code into rndis_filter_halt_device()
We need to wait for send_completion msg before put_rndis_request() at
the end of rndis_filter_halt_device(). Otherwise, netvsc_send_completion()
may reference freed memory which is overwritten, and cause panic.
Reported-by: Long Li <longli@microsoft.com>
Reported-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/netvsc.c')
-rw-r--r-- | drivers/net/hyperv/netvsc.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 6cee2917eb02..4a1a5f58fa73 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c @@ -383,13 +383,6 @@ int netvsc_device_remove(struct hv_device *device) unsigned long flags; net_device = hv_get_drvdata(device); - spin_lock_irqsave(&device->channel->inbound_lock, flags); - net_device->destroy = true; - spin_unlock_irqrestore(&device->channel->inbound_lock, flags); - - /* Wait for all send completions */ - wait_event(net_device->wait_drain, - atomic_read(&net_device->num_outstanding_sends) == 0); netvsc_disconnect_vsp(net_device); |