net: ipa: don't be a hog in gsi_channel_poll()
Subsystems (3)
PATCH 1/1 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 <[email protected]>
Signed-off-by Alex Elder <[email protected]>
--- drivers/net/ipa/gsi.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ipa/gsi.c +1 -0
@@ -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 ;
Signature · 1 line
2.20.1
From: Alex Elder <[email protected]>
Date: Fri, 15 May 2020 14:52:03 -0500
Quoted 8 lines
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 <[email protected]>Signed-off-by Alex Elder <[email protected]>
Applied, thanks.