linux_dsm_epyc7002/drivers/net/can/m_can
Marc Kleine-Budde 26359d362c can: m_can: m_can_tx_work_queue(): fix tx_skb race condition
[ Upstream commit e04b2cfe61072c7966e1a5fb73dd1feb30c206ed ]

The m_can_start_xmit() function checks if the cdev->tx_skb is NULL and
returns with NETDEV_TX_BUSY in case tx_sbk is not NULL.

There is a race condition in the m_can_tx_work_queue(), where first
the skb is send to the driver and then the case tx_sbk is set to NULL.
A TX complete IRQ might come in between and wake the queue, which
results in tx_skb not being cleared yet.

Fixes: f524f829b7 ("can: m_can: Create a m_can platform framework")
Tested-by: Torin Cooper-Bennun <torin@maxiluxsystems.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-19 10:13:08 +02:00
..
Kconfig can: tcan4x5x: replace depends on REGMAP_SPI with depends on SPI 2020-11-15 18:24:36 +01:00
m_can_platform.c can: m_can: Fix freeing of can device from peripherials 2020-11-15 18:33:45 +01:00
m_can.c can: m_can: m_can_tx_work_queue(): fix tx_skb race condition 2021-05-19 10:13:08 +02:00
m_can.h can: m_can: m_can_class_free_dev(): introduce new function 2020-11-15 18:33:42 +01:00
Makefile can: tcan4x5x: Add tcan4x5x driver to the kernel 2019-07-24 10:31:54 +02:00
tcan4x5x.c can: tcan4x5x: fix max register value 2021-04-07 15:00:07 +02:00