Skip to content

Commit

Permalink
net: ipa: don't be a hog in gsi_channel_poll()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Elder authored and davem330 committed May 16, 2020
1 parent 5e5502e commit f45a7bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ipa/gsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f45a7bc

Please sign in to comment.