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)
Mon, Oct 5, 11:17 AM
Unknown Object (File)
Sat, Oct 3, 7:55 AM
Unknown Object (File)
Fri, Oct 2, 1:45 AM
Unknown Object (File)
Fri, Sep 25, 4:27 PM
Unknown Object (File)
Sun, Sep 20, 2:30 AM
Unknown Object (File)
Mon, Sep 14, 9:11 AM
Unknown Object (File)
Aug 25 2026, 11:17 PM
Unknown Object (File)
Aug 25 2026, 1:26 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37986
Build 34875: arc lint + arc unit