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)
(cherry picked from commit b206bfb92c1f522c85ef1db44d42431e6c0d9334)

Approved by: re (gjb)

Details

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