diff options
| author | Marc Kleine-Budde <mkl@pengutronix.de> | 2022-09-20 11:40:56 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-28 11:02:56 +0200 |
| commit | 71d9e0874c6bd577ac29fbd515515f54048932f7 (patch) | |
| tree | fe133d80db7bc55eefb6e20962b83157cb3a0d0b /include/linux/adb.h | |
| parent | 1e98318af2f163eadaff815abcef38d27ca92c1e (diff) | |
can: gs_usb: gs_can_open(): fix race dev->can.state condition
[ Upstream commit 5440428b3da65408dba0241985acb7a05258b85e ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/adb.h')
0 files changed, 0 insertions, 0 deletions
