net: ipa: don't be a hog in gsi_channel_poll()

The iteration count value used in gsi_channel_poll() is intended to
limit poll iterations to the budget supplied as an argument.  But
it's never updated.

Fix this bug by incrementing the count each time through the loop.

Reported-by: Sharath Chandra Vurukala <sharathv@codeaurora.com>
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Alex Elder 2020-05-15 14:52:03 -05:00 committed by David S. Miller
parent 5e5502e012
commit f45a7bccdc
1 changed files with 1 additions and 0 deletions

View File

@ -1392,6 +1392,7 @@ static int gsi_channel_poll(struct napi_struct *napi, int budget)
while (count < budget) {
struct gsi_trans *trans;
count++;
trans = gsi_channel_poll_one(channel);
if (!trans)
break;