]> git.baikalelectronics.ru Git - kernel.git/commit
caif: Fix napi poll list corruption
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 22 Dec 2014 09:35:25 +0000 (20:35 +1100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Dec 2014 21:34:39 +0000 (16:34 -0500)
commit4be35b1a398cc4d97c32886ba9edc153288f99fa
treecc7f3f21c07534f6268535ff41b60df6dfbb1aeb
parent8b29d3f4e9cd688cdeb5ba9fcedd4ecf6bf03b0d
caif: Fix napi poll list corruption

The commit e6205aa1c6382bd820b2d3b1109f821e3effdad7 (net: less
interrupt masking in NAPI) breaks caif.

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 caif tries to do a last-ditch check and if there is
more work it will call napi_schedule 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 caif.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/caif/caif_virtio.c