HomeFreeBSD

buf_alloc(): Stop using LK_NOWAIT, use LK_NOWITNESS

Description

buf_alloc(): Stop using LK_NOWAIT, use LK_NOWITNESS

Despite the buffer taken from cache or free list, it still can be
locked, due to 'lockless lookup' in getblkx() potentially operating on
the freed buffers. The lock is transient, but prevents the use of
LK_NOWAIT there for the goal of neutralizing WITNESS.

Just use LK_NOWITNESS.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 1fb00c8f1060e18fed621f13d31db7b336d2267e)

Details

Provenance
kibAuthored on Feb 16 2022, 3:30 PM
markjCommitted on Mar 14 2022, 2:10 PM
Parents
rG80bab8aa7ed8: linuxkpi: fix module build outside of kernel build environment
Branches
Unknown
Tags
Unknown