]> 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>
Mon, 11 Apr 2022 13:59:21 +0000 (09:59 -0400)
commit53460a2c7e0e07d4a18025ab4a0d151c5be6fa18
treeb91f4441ac19e80e03bb66b70a04121ffbe68a27
parent21a2bfcafbff2a6bd3b29c5e6e75d35bdb1fb959
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.

Approved by: re (gjb)
Reviewed by: bz, melifaro
Reported by: pho
Fixes: 0b79b007ebfc ("[lltable] Restructure nd6 code.")
Sponsored by: The FreeBSD Foundation

(cherry picked from commit dd91d8448665dd31df5be7341756394293c6e36c)
(cherry picked from commit 078d50f9dd14ac77145b2cf8f143d49329b2c4f7)
sys/netinet/if_ether.c
sys/netinet6/nd6_nbr.c