Open
Description
HAL_ETH uses gState as a "poor man's mutex" to guard it's internal state and associated hardware registers against concurrent access and enforce a specific order of initialization.
When gState gets tested and set to BUSY for example, HAL_ETH does critical things to its own state or the hardware:
Yet these test and set operations are not done atomically (e.g. inside a critical section) so the HAL_ETH locking via gState is vulnerable to race conditions in situations with preemption (e.g. with lwIP + FreeRTOS)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Analyzed