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)
Thu, May 28, 7:23 PM
Unknown Object (File)
Thu, May 28, 7:23 PM
Unknown Object (File)
Thu, May 28, 7:22 PM
Unknown Object (File)
Sun, May 24, 2:17 AM
Unknown Object (File)
Wed, May 20, 4:29 AM
Unknown Object (File)
May 10 2026, 10:16 AM
Unknown Object (File)
May 10 2026, 10:11 AM
Unknown Object (File)
May 10 2026, 6:04 AM
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