Skip to content

Commit

Permalink
caif: Fix napi poll list corruption
Browse files Browse the repository at this point in the history
The commit d75b1ad (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>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Dec 22, 2014
1 parent 492f5ad commit 3079c65
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/caif/caif_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ static int cfv_rx_poll(struct napi_struct *napi, int quota)
struct vringh_kiov *riov = &cfv->ctx.riov;
unsigned int skb_len;

again:
do {
skb = NULL;

Expand Down Expand Up @@ -322,7 +321,6 @@ static int cfv_rx_poll(struct napi_struct *napi, int quota)
napi_schedule_prep(napi)) {
vringh_notify_disable_kern(cfv->vr_rx);
__napi_schedule(napi);
goto again;
}
break;

Expand Down

0 comments on commit 3079c65

Please sign in to comment.