Page MenuHomeFreeBSD

buf: Relax an assertion in BUF_UNLOCK
ClosedPublic

Authored by markj on Feb 21 2026, 4:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 12, 7:23 PM
Unknown Object (File)
Sat, Apr 11, 10:45 PM
Unknown Object (File)
Sat, Apr 11, 6:37 PM
Unknown Object (File)
Tue, Apr 7, 3:31 PM
Unknown Object (File)
Mon, Apr 6, 12:53 PM
Unknown Object (File)
Wed, Apr 1, 1:36 AM
Unknown Object (File)
Sat, Mar 28, 2:44 PM
Unknown Object (File)
Mar 14 2026, 12:22 PM
Subscribers

Details

Summary

The BUF_UNLOCK macro asserts that B_REMFREE is not set, as it is up to
the lock owner to complete the dequeue from the free list before
releasing the lock. However, if the thread has acquired the lock
multiple times, then releasing the recursive lock should be ok. Modify
the assertion to reflect this.

This was triggered by an out-of-tree filesystem.

Diff Detail

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