diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2023-09-28 21:58:23 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2023-10-05 21:32:12 +0200 |
commit | fe5c9940dfd8ba0c73672dddb30acd1b7a11d4c7 (patch) | |
tree | fe21ccae0d37b3d013d0df82a26d75f4508a0f97 /net | |
parent | 3b9333493b5fa69f2dce8eb96bbef32df1b65c4a (diff) | |
download | lwn-fe5c9940dfd8ba0c73672dddb30acd1b7a11d4c7.tar.gz lwn-fe5c9940dfd8ba0c73672dddb30acd1b7a11d4c7.zip |
can: dev: can_restart(): don't crash kernel if carrier is OK
During testing, I triggered a can_restart() with the netif carrier
being OK [1]. The BUG_ON, which checks if the carrier is OK, results
in a fatal kernel crash. This is neither helpful for debugging nor for
a production system.
[1] The root cause is a race condition in can_restart() which will be
fixed in the next patch.
Do not crash the kernel, issue an error message instead, and continue
restarting the CAN device anyway.
Fixes: 39549eef3587 ("can: CAN Network device driver and Netlink interface")
Link: https://lore.kernel.org/all/20231005-can-dev-fix-can-restart-v2-1-91b5c1fd922c@pengutronix.de
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions