]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
net: emac: Fix napi poll list corruption
authorChristian Lamparter <chunkeey@googlemail.com>
Tue, 19 Sep 2017 17:35:18 +0000 (19:35 +0200)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 19 Oct 2017 14:48:27 +0000 (09:48 -0500)
commitb695349ef12dd26ef0c8ee001714a0806dfca7db
tree0d3de8f0cb6983788a3f46527e6e827d81429fef
parent8d2ad3b2bcaca374349cd1d6f1abeda771ee051a
net: emac: Fix napi poll list corruption

BugLink: http://bugs.launchpad.net/bugs/1723145
[ Upstream commit f55956065ec94e3e9371463d693a1029c4cc3007 ]

This patch is pretty much a carbon copy of
commit 3079c652141f ("caif: Fix napi poll list corruption")
with "caif" replaced by "emac".

The commit d75b1ade567f ("net: less interrupt masking in NAPI")
breaks emac.

It is now required that if the entire budget is consumed when poll
returns, the napi poll_list must remain empty.  However, like some
other drivers emac tries to do a last-ditch check and if there is
more work it will call napi_reschedule and then immediately process
some of this new work.  Should the entire budget be consumed while
processing such new work then we will violate the new caller
contract.

This patch fixes this by not touching any work when we reschedule
in emac.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/net/ethernet/ibm/emac/mal.c