]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: Fix unwanted wakeup after tx_disable
authorHaiyang Zhang <haiyangz@microsoft.com>
Thu, 28 Mar 2019 19:40:36 +0000 (19:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Mar 2019 20:34:01 +0000 (13:34 -0700)
commitceb24e45a5db91782aee6f5ce6c68056e3068b62
tree30f5fe2405cec13c5c291ee19dae6ec2005d3cef
parent4973b0e0ba9f84550480f9a48c7c17ee231c7f7c
hv_netvsc: Fix unwanted wakeup after tx_disable

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: cb3aa3606eeb ("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>
drivers/net/hyperv/hyperv_net.h
drivers/net/hyperv/netvsc.c
drivers/net/hyperv/netvsc_drv.c