HomeFreeBSD

ZIL: Revert zl_lock scope reduction.

Description

ZIL: Revert zl_lock scope reduction.

While I have no reports of it, I suspect possible use-after-free
scenario when zil_commit_waiter() tries to dereference zcw_lwb
for lwb already freed by zil_sync(), while zcw_done is not set.
Extension of zl_lock scope as it was originally should block
zil_sync() from freeing the lwb, closing this race.

This reverts #14959 and couple chunks of #14841.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15228

Details

Provenance
mavAuthored on Sep 2 2023, 12:13 AM
GitHub <noreply@github.com>Committed on Sep 2 2023, 12:13 AM
Parents
rGbbcf18c29365: ZIL: Tune some assertions.
Branches
Unknown
Tags
Unknown

Event Timeline