Menu ▾ ▴

#482 Lock-order inversion during topology counter update from TTI callback

3.1.0.0
accepted
tti (2)
2 days ago
2 days ago
No

The TTI PD callback can update the ETB and operational train topology counters by calling tlc_setETBTopoCount() and tlc_setOpTrainTopoCount().

These functions acquire the TRDP session mutex while the callback is executed from the PD receive path. Other TRDP processing can acquire the same locks in the opposite order, creating a lock-order inversion and a possible deadlock.

The topology update path should avoid nested mutex acquisition in an incompatible order while preserving thread-safe access to the topology counters.

Discussion


Log in to post a comment.