]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: ethernet: ti: am65-cpsw: Fix NAPI registration sequence
authorVignesh Raghavendra <vigneshr@ti.com>
Tue, 11 Mar 2025 15:42:59 +0000 (21:12 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Mar 2025 21:03:27 +0000 (22:03 +0100)
commitd4bf956547c38c04fad8d72a961ac4dc00bad000
treec16c7487dd70fd271892beba51bc451afdeb56ad
parent8bf2f1ba272942559cb56f7e7eb44f2f6b497b98
net: ethernet: ti: am65-cpsw: Fix NAPI registration sequence

[ Upstream commit 5f079290e5913a0060e059500b7d440990ac1066 ]

Registering the interrupts for TX or RX DMA Channels prior to registering
their respective NAPI callbacks can result in a NULL pointer dereference.
This is seen in practice as a random occurrence since it depends on the
randomness associated with the generation of traffic by Linux and the
reception of traffic from the wire.

Fixes: 681eb2beb3ef ("net: ethernet: ti: am65-cpsw: ensure proper channel cleanup in error path")
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Co-developed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Link: https://patch.msgid.link/20250311154259.102865-1-s-vadapalli@ti.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/ti/am65-cpsw-nuss.c