HomeFreeBSD

vfs cache: plug a hypothetical corner case when freeing

Description

vfs cache: plug a hypothetical corner case when freeing

cache_zap_unlocked_bucket is called with a bunch of addresses and
without any locks held, forcing it to revalidate everything from
scratch.

It did not account for a case where the entry is reallocated with
everything the same except for the target vnode.

Should the target use a different lock than the one expected, freeing
would proceed without being properly synchronized.

Note this is almost impossible to happen in practice.

(cherry picked from commit 0f15054f7990f9c772bea34778a8838aa05ebed8)

Details

Provenance
mjgAuthored on Sep 23 2023, 2:04 AM
Parents
rG75b03f73b4a0: vfs cache: sanitize debug counters
Branches
Unknown
Tags
Unknown