diff options
| author | Andrea Righi <arighi@nvidia.com> | 2026-06-26 18:32:18 +0200 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-06-30 12:13:20 +0200 |
| commit | 39139b1c1c2b614096519b526112c726adb12ff0 (patch) | |
| tree | 85104988ba01f937c3592a5e45d7be4bfcb87e3f /rust/zerocopy/git@git.tavy.me:linux-stable.git | |
| parent | 6ab752e0b59b825c127d5c86438bee1e8b1641ea (diff) | |
net: lan743x: Initialize eth_syslock spinlock before use
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@vger.kernel.org # v6.0+
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Reviewed-by: David Thompson <davthompson@nvidia.com>
Reviewed-by: Thangaraj Samynathan<Thangaraj.s@microchip.com>
Link: https://patch.msgid.link/20260626163218.3591486-1-arighi@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'rust/zerocopy/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
