Browse Source
This fixes deadlock in socket close path. In the scenario: 1. on_cmd_ipd/esp_socket_rx invokes esp_socket_ref_from_link_id and increments refcount. 2. zvfs_close/esp_put locks cond.lock. 3. zvfs_close/esp_put waits on sem_free. 4. on_cmd_ipd/esp_socket_rx waits on cond.lock before esp_socket_unref. 5. sem_free waits on esp_socket_unref for refcount reaching zero. As we detect socket is closing, we can ignore last rx data and escape from the trap. Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>pull/92038/merge
1 changed files with 22 additions and 1 deletions
Loading…
Reference in new issue