]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
net: Fix LLE lock leaks
authorMark Johnston <markj@FreeBSD.org>
Fri, 8 Apr 2022 15:46:19 +0000 (11:46 -0400)
committerMark Johnston <markj@FreeBSD.org>
Fri, 8 Apr 2022 15:46:19 +0000 (11:46 -0400)
commitdd91d8448665dd31df5be7341756394293c6e36c
tree6e2d6c3191f8c3120cdac4238821134733e0d506
parentfcaf016796cc0272a8c239850fa87244eebefe13
net: Fix LLE lock leaks

Historically, lltable_try_set_entry_addr() would release the LLE lock
upon failure.  After some refactoring, it no longer does so, but
consumers were not adjusted accordingly.

Also fix a leak that can occur if lltable_calc_llheader() fails in the
ARP code, but I suspect that such a failure can only occur due to a code
bug.

Reviewed by: bz, melifaro
Reported by: pho
Fixes: 0b79b007ebfc ("[lltable] Restructure nd6 code.")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34831
sys/netinet/if_ether.c
sys/netinet6/nd6_nbr.c