]> Git Repo - linux.git/commit
qca_debug: Prevent crash on TX ring changes
authorStefan Wahren <[email protected]>
Wed, 6 Dec 2023 14:12:20 +0000 (15:12 +0100)
committerJakub Kicinski <[email protected]>
Sat, 9 Dec 2023 00:12:18 +0000 (16:12 -0800)
commitf4e6064c97c050bd9904925ff7d53d0c9954fc7b
tree18a08b81e167aaab240b0170c3aaf892598e3e91
parenta1664b991ac12b872be859ca03529c68c72795a2
qca_debug: Prevent crash on TX ring changes

The qca_spi driver stop and restart the SPI kernel thread
(via ndo_stop & ndo_open) in case of TX ring changes. This is
a big issue because it allows userspace to prevent restart of
the SPI kernel thread (via signals). A subsequent change of
TX ring wrongly assume a valid spi_thread pointer which result
in a crash.

So prevent this by stopping the network traffic handling and
temporary park the SPI thread.

Fixes: 291ab06ecf67 ("net: qualcomm: new Ethernet over SPI driver for QCA7000")
Signed-off-by: Stefan Wahren <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
drivers/net/ethernet/qualcomm/qca_debug.c
drivers/net/ethernet/qualcomm/qca_spi.c
This page took 0.053695 seconds and 4 git commands to generate.