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
MFC after: 3 days

Details

Provenance
kibAuthored on Feb 16 2022, 3:30 PM
markjCommitted on Mar 6 2022, 3:29 PM
Parents
rG822d379b1f47: ssh: regen sk_config.h after 73104d583850
Branches
Unknown
Tags
Unknown