aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGravatar Marc Kleine-Budde <mkl@pengutronix.de> 2022-09-20 11:40:56 +0200
committerGravatar Marc Kleine-Budde <mkl@pengutronix.de> 2022-09-21 09:48:51 +0200
commit5440428b3da65408dba0241985acb7a05258b85e (patch)
tree38ffc62bd9b2c23ea1c9dee1b6e0bf7ff1a22eb7 /include
parentcan: flexcan: flexcan_mailbox_read() fix return value for drop = true (diff)
downloadlinux-5440428b3da6.tar.gz
linux-5440428b3da6.tar.bz2
linux-5440428b3da6.zip
can: gs_usb: gs_can_open(): fix race dev->can.state condition
The dev->can.state is set to CAN_STATE_ERROR_ACTIVE, after the device has been started. On busy networks the CAN controller might receive CAN frame between and go into an error state before the dev->can.state is assigned. Assign dev->can.state before starting the controller to close the race window. Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices") Link: https://lore.kernel.org/all/20220920195216.232481-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions