source: f-stack/dpdk/drivers/net/axgbe/axgbe_phy_impl.c Hi, developers, thank you for your checking. The lock pdata->phy_mutex may not be correctly released if the phy_data->comm_owned is true and the control flow goes to the branch listed below. Finally, the method returns with the unreleased lock. The fix is to insert pthread_mutex_unlock(&pdata->phy_mutex); before returning. static int axgbe_phy_get_comm_ownership(struct axgbe_port *pdata) { struct axgbe_phy_data *phy_data = pdata->phy_data; uint64_t timeout; unsigned int mutex_id; /* The I2C and MDIO/GPIO bus is multiplexed between multiple devices, * the driver needs to take the software mutex and then the hardware * mutexes before being able to use the busses. */ pthread_mutex_lock(&pdata->phy_mutex); if (phy_data->comm_owned) return 0; // the method returns with the unreleased lock ...; return -ETIMEDOUT; }
source: drivers/net/axgbe/axgbe_phy_impl.c