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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240514100213.GA2787@kernel.org>
Date: Tue, 14 May 2024 11:02:13 +0100
From: Simon Horman <horms@...nel.org>
To: Ronald Wahl <rwahl@....de>
Cc: Ronald Wahl <ronald.wahl@...itan.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] net: ks8851: Fix another TX stall caused by wrong ISR
 flag handling

On Mon, May 13, 2024 at 04:39:22PM +0200, Ronald Wahl wrote:
> From: Ronald Wahl <ronald.wahl@...itan.com>
> 
> Under some circumstances it may happen that the ks8851 Ethernet driver
> stops sending data.
> 
> Currently the interrupt handler resets the interrupt status flags in the
> hardware after handling TX. With this approach we may lose interrupts in
> the time window between handling the TX interrupt and resetting the TX
> interrupt status bit.
> 
> When all of the three following conditions are true then transmitting
> data stops:
> 
>   - TX queue is stopped to wait for room in the hardware TX buffer
>   - no queued SKBs in the driver (txq) that wait for being written to hw
>   - hardware TX buffer is empty and the last TX interrupt was lost
> 
> This is because reenabling the TX queue happens when handling the TX
> interrupt status but if the TX status bit has already been cleared then
> this interrupt will never come.
> 
> With this commit the interrupt status flags will be cleared before they
> are handled. That way we stop losing interrupts.
> 
> The wrong handling of the ISR flags was there from the beginning but
> with commit 3dc5d4454545 ("net: ks8851: Fix TX stall caused by TX
> buffer overrun") the issue becomes apparent.
> 
> Fixes: 3dc5d4454545 ("net: ks8851: Fix TX stall caused by TX buffer overrun")
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Eric Dumazet <edumazet@...gle.com>
> Cc: Jakub Kicinski <kuba@...nel.org>
> Cc: Paolo Abeni <pabeni@...hat.com>
> Cc: Simon Horman <horms@...nel.org>
> Cc: netdev@...r.kernel.org
> Cc: stable@...r.kernel.org # 5.10+
> Signed-off-by: Ronald Wahl <ronald.wahl@...itan.com>

Reviewed-by: Simon Horman <horms@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ