hv_netvsc: Fix unwanted wakeup after tx_disable
authorHaiyang Zhang <haiyangz@microsoft.com>
Thu, 28 Mar 2019 19:40:36 +0000 (19:40 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2019 06:37:51 +0000 (08:37 +0200)
commit789185d40eff67b9d89367d1442b62c8f31ce872
treecfbb7062b8dc4e3828980a8c16d7ae45b889c324
parentbc280a1edc23afabc04c97c04841d996e0788c6d
hv_netvsc: Fix unwanted wakeup after tx_disable

[ Upstream commit 1b704c4a1ba95574832e730f23817b651db2aa59 ]

After queue stopped, the wakeup mechanism may wake it up again
when ring buffer usage is lower than a threshold. This may cause
send path panic on NULL pointer when we stopped all tx queues in
netvsc_detach and start removing the netvsc device.

This patch fix it by adding a tx_disable flag to prevent unwanted
queue wakeup.

Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic")
Reported-by: Mohammed Gamal <mgamal@redhat.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/hyperv/hyperv_net.h
drivers/net/hyperv/netvsc.c
drivers/net/hyperv/netvsc_drv.c