Re: [PATCH] net: lan743x: Initialize eth_syslock spinlock before use

From: Paolo Abeni

Date: Tue Jun 30 2026 - 11:54:57 EST


On 6/26/26 6:32 PM, Andrea Righi wrote:
> lan743x_hardware_init() calls pci11x1x_strap_get_status() during the
> PCI11x1x probe sequence. That helper acquires the Ethernet subsystem
> hardware lock via lan743x_hs_syslock_acquire(), which relies on
> adapter->eth_syslock_spinlock to serialize access.
>
> The spinlock is currently initialized only after the strap status is
> read. With CONFIG_DEBUG_SPINLOCK enabled, taking the zeroed initialized
> spinlock can trip the spinlock debug check.
>
> Fix by initializing adapter->eth_syslock_spinlock before reading the
> strap status so the probe path never attempts to lock an uninitialized
> spinlock.
>
> Fixes: 46b777ad9a8c ("net: lan743x: Add support to SGMII 1G and 2.5G")
> Cc: stable@xxxxxxxxxxxxxxx # v6.0+
> Signed-off-by: Andrea Righi <arighi@xxxxxxxxxx>

The PW bot is on holiday, no automated notifications for a while.

Applied, thanks!

/P