Page MenuHomeFreeBSD

lib/libc/net/nsdispatch.c: Fix missing unlock and add locking annotations
ClosedPublic

Authored by arichardson on Mar 22 2021, 10:27 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 5 2024, 8:22 AM
Unknown Object (File)
Oct 2 2024, 8:30 PM
Unknown Object (File)
Oct 2 2024, 7:18 PM
Unknown Object (File)
Sep 26 2024, 9:28 AM
Unknown Object (File)
Sep 25 2024, 11:38 AM
Unknown Object (File)
Sep 19 2024, 9:13 AM
Unknown Object (File)
Sep 11 2024, 12:59 AM
Unknown Object (File)
Aug 31 2024, 11:17 PM
Subscribers

Details

Summary

The error cases (goto fin) of _nsdispatch were missing the unlock.

This change also drops the checks for __isthreaded since the pthread stubs
are already no-ops if threads are not being used. Dropping those conditionals
allows clang's thread safety analysis to deal with the file and also makes
the code a bit more readable. While touching the file also add a few more
assertions in debug mode that the right locks are held.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable