aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ipa/gsi.c
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2020-05-15 14:52:03 -0500
committerDavid S. Miller <davem@davemloft.net>2020-05-16 15:14:54 -0700
commitf45a7bccdc190e2cf6ca3a527edbc4c80d7114ef (patch)
tree53116d902f1e883ad107eeac4f0366e9449922b1 /drivers/net/ipa/gsi.c
parentnet: dsa: mt7530: fix roaming from DSA user ports (diff)
downloadwireguard-linux-f45a7bccdc190e2cf6ca3a527edbc4c80d7114ef.tar.xz
wireguard-linux-f45a7bccdc190e2cf6ca3a527edbc4c80d7114ef.zip
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>
Diffstat (limited to 'drivers/net/ipa/gsi.c')
-rw-r--r--drivers/net/ipa/gsi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c
index b671bea0aa7c..8d9ca1c335e8 100644
--- a/drivers/net/ipa/gsi.c
+++ b/drivers/net/ipa/gsi.c
@@ -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;