]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commita19795269a92e9d2e9fe5ac5f9a76208b3563aa4
treeaef377c59287d607ec2a8775b9d038ce82b2fa95
parent3f504e9623a32f346fd53680d698a66b4478b084
hv_netvsc: Fix unwanted wakeup after tx_disable

BugLink: https://bugs.launchpad.net/bugs/1838116
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/hyperv/hyperv_net.h
drivers/net/hyperv/netvsc.c
drivers/net/hyperv/netvsc_drv.c