1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-31 01:11:21 +01:00

gnrc_netif: add missing gnrc_netif_release() to early return

The gnrc_netif_ipv6_addr_add_internal() function unconditionally
acquires the global netif rmutex lock but doesn't release this lock on
this specific path (i.e. if gnrc_netif_ipv6_group_join_internal failed).
This can cause a deadlock as no other thread will afterwards be capable
of acquiring the netif lock.
This commit is contained in:
Sören Tempel 2020-10-13 04:42:52 +02:00
parent 4852c09027
commit af03cd8f4f

View File

@ -561,6 +561,7 @@ int gnrc_netif_ipv6_addr_add_internal(gnrc_netif_t *netif,
PRIkernel_pid "\n",
ipv6_addr_to_str(addr_str, addr, sizeof(addr_str)),
netif->pid);
gnrc_netif_release(netif);
return res;
}
#else /* CONFIG_GNRC_IPV6_NIB_ARSM */