]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Sep 2017 23:20:25 +0000 (16:20 -0700)
commitad811fd29437201990c37a87b64b973a0b1db665
tree9c143c72bc673cfa0faca039e55072b5580c97b8
parent55748532a0c874414da6188d608ab29bc5d20404
net: emac: Fix napi poll list corruption

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

The commit c7f3160ce886 ("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>
drivers/net/ethernet/ibm/emac/mal.c