diff options
author | Fedor Pchelkin <[email protected]> | 2023-05-26 20:19:09 +0300 |
---|---|---|
committer | Marc Kleine-Budde <[email protected]> | 2023-06-05 08:26:31 +0200 |
commit | cd9c790de2088b0d797dc4d244b4f174f9962554 (patch) | |
tree | 9592255c416e0f6136b185c7a8e5a25b11496d73 /tools/perf/scripts/python/check-perf-trace.py | |
parent | 2a84aea80e925ecba6349090559754f8e8eb68ef (diff) |
can: j1939: change j1939_netdev_lock type to mutex
It turns out access to j1939_can_rx_register() needs to be serialized,
otherwise j1939_priv can be corrupted when parallel threads call
j1939_netdev_start() and j1939_can_rx_register() fails. This issue is
thoroughly covered in other commit which serializes access to
j1939_can_rx_register().
Change j1939_netdev_lock type to mutex so that we do not need to remove
GFP_KERNEL from can_rx_register().
j1939_netdev_lock seems to be used in normal contexts where mutex usage
is not prohibited.
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol")
Suggested-by: Alexey Khoroshilov <[email protected]>
Signed-off-by: Fedor Pchelkin <[email protected]>
Tested-by: Oleksij Rempel <[email protected]>
Acked-by: Oleksij Rempel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: [email protected]
Signed-off-by: Marc Kleine-Budde <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions