Commit Graph
2 Commits
Author SHA1 Message Date
Andrew Tridgell 1bfd33b6e8 AP_CANManager: fixed mutex ordering deadlock in MAVCAN
we had a deadlock between the mutex in HAL_ChibiOS CAN layer and the
MAVLinkCAN object

the deadlock arose because the low level CAN layer holds the HAL CAN
mutex before it calls up to the MAVLinkCAN frame callback

on the mavlink side, it took the MAVLinkCAN mutex before calling down
to the CAN send layer, this meant it took the 2 mutexes in the
opposite order

the symptoms were:

 - failure to boot if we have active MAVCAN during reboot as we
 deadlock during the scheduler delay callback

 - deadlock during heavy MAVCAN usage
2025-06-08 14:18:23 +10:00
bugobliterator 0ba6e570d3 AP_CANManager: create a new class for MAVLink CAN 2025-05-06 14:19:12 +10:00