lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240911112245.283832-1-webmaster@jbsky.fr>
Date: Wed, 11 Sep 2024 13:22:45 +0200
From: Julien Blais <webmaster@...ky.fr>
To: thomas.petazzoni@...tlin.com,
	davem@...emloft.net,
	kuba@...nel.org,
	netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Julien Blais <webmaster@...ky.fr>
Subject: [PATCH] mvneta: fix "napi poll" infinite loop

In percpu mode, when there's a network load, one of the cpus can be
solicited without having anything to process.
If 0 is returned to napi poll, napi will ignore the next requests,
causing an infinite loop with ISR handling.

Without this change, patches hang around fixing the queue at 0 and
the interrupt remains stuck on the 1st CPU.
The percpu conf is useless in this case, so we might as well remove it.

Signed-off-by: Julien Blais <webmaster@...ky.fr>
---
 drivers/net/ethernet/marvell/mvneta.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 3f124268b..8084b573e 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3185,8 +3185,10 @@ static int mvneta_poll(struct napi_struct *napi, int budget)
 	}
 
 	if (rx_done < budget) {
-		cause_rx_tx = 0;
-		napi_complete_done(napi, rx_done);
+		if (rx_done)
+			napi_complete_done(napi, rx_done);
+		else
+			napi_complete(napi);
 
 		if (pp->neta_armada3700) {
 			unsigned long flags;
-- 
2.30.2



--
This e-mail and any attached files are confidential and may be legally privileged. If you are not the addressee, any disclosure, reproduction, copying, distribution, or other dissemination or use of this communication is strictly prohibited. If you have received this transmission in error please notify the sender immediately and then delete this mail.
E-mail transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission or changes to transmitted date not specifically approved by the sender.
If this e-mail or attached files contain information which do not relate to our professional activity we do not accept liability for such information.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ