Skip to content

Commit 3079c65

Browse files
herbertxdavem330
authored andcommitted
caif: Fix napi poll list corruption
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>
1 parent 492f5ad commit 3079c65

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/net/caif/caif_virtio.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ static int cfv_rx_poll(struct napi_struct *napi, int quota)
257257
struct vringh_kiov *riov = &cfv->ctx.riov;
258258
unsigned int skb_len;
259259

260-
again:
261260
do {
262261
skb = NULL;
263262

@@ -322,7 +321,6 @@ static int cfv_rx_poll(struct napi_struct *napi, int quota)
322321
napi_schedule_prep(napi)) {
323322
vringh_notify_disable_kern(cfv->vr_rx);
324323
__napi_schedule(napi);
325-
goto again;
326324
}
327325
break;
328326

0 commit comments

Comments
 (0)