Commit 3079c652 authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

caif: Fix napi poll list corruption

The commit d75b1ade (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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 492f5add
...@@ -257,7 +257,6 @@ static int cfv_rx_poll(struct napi_struct *napi, int quota) ...@@ -257,7 +257,6 @@ static int cfv_rx_poll(struct napi_struct *napi, int quota)
struct vringh_kiov *riov = &cfv->ctx.riov; struct vringh_kiov *riov = &cfv->ctx.riov;
unsigned int skb_len; unsigned int skb_len;
again:
do { do {
skb = NULL; skb = NULL;
...@@ -322,7 +321,6 @@ static int cfv_rx_poll(struct napi_struct *napi, int quota) ...@@ -322,7 +321,6 @@ static int cfv_rx_poll(struct napi_struct *napi, int quota)
napi_schedule_prep(napi)) { napi_schedule_prep(napi)) {
vringh_notify_disable_kern(cfv->vr_rx); vringh_notify_disable_kern(cfv->vr_rx);
__napi_schedule(napi); __napi_schedule(napi);
goto again;
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment