* [PATCH net 1/1] net: ipa: don't be a hog in gsi_channel_poll()
@ 2020-05-15 19:52 Alex Elder
2020-05-16 22:16 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Alex Elder @ 2020-05-15 19:52 UTC (permalink / raw)
To: davem, kuba
Cc: evgreen, subashab, cpratapa, bjorn.andersson, netdev,
linux-kernel, Sharath Chandra Vurukala
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>
---
drivers/net/ipa/gsi.c | 1 +
1 file changed, 1 insertion(+)
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;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net 1/1] net: ipa: don't be a hog in gsi_channel_poll()
2020-05-15 19:52 [PATCH net 1/1] net: ipa: don't be a hog in gsi_channel_poll() Alex Elder
@ 2020-05-16 22:16 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-05-16 22:16 UTC (permalink / raw)
To: elder
Cc: kuba, evgreen, subashab, cpratapa, bjorn.andersson, netdev,
linux-kernel, sharathv
From: Alex Elder <elder@linaro.org>
Date: Fri, 15 May 2020 14:52:03 -0500
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-16 22:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 19:52 [PATCH net 1/1] net: ipa: don't be a hog in gsi_channel_poll() Alex Elder
2020-05-16 22:16 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).