mirror_zfs/module
Alexander Motin 35b2d39709
Lock db_mtx around arc_release() in couple places
* Lock db_mtx around arc_release() in dbuf_release_bp()

While this function is called only in sync context, the same buffer
can be touched by dbuf_hold_impl() in open context, creating races.
All other accesses to arc_release() are already protected by db_mtx,
so just take it here too.

Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com>

* Lock db_mtx in sa_byteswap()

While SA code seems protected by sa_lock, there is a back door of
dmu_objset_userquota_get_ids(), that may hold and access the dbuf
without sa_lock, relying only on db_mtx. Taking db_mtx here should
protect both the arc_release() and the data for db_buf.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com>
Closes #18146
2026-01-26 21:32:16 -05:00
..
avl Prefer VERIFY0P(n) over VERIFY(n == NULL) 2025-08-07 11:41:37 -07:00
icp icp: emit .note.GNU-stack section for all ELF targets 2026-01-08 09:21:12 -08:00
lua SPDX: license tags: MIT 2025-03-13 17:56:54 -07:00
nvpair Prefer VERIFY0P(n) over VERIFY3P(n, ==, NULL) 2025-08-07 11:41:42 -07:00
os remove thread unsafe debug code causing FreeBSD double free panic 2026-01-21 10:00:34 -08:00
zcommon Add snapshots_changed_nsecs dataset property 2026-01-06 09:36:20 -08:00
zfs Lock db_mtx around arc_release() in couple places 2026-01-26 21:32:16 -05:00
zstd Zstd: Document update policy 2026-01-20 13:41:24 -08:00
.gitignore FreeBSD: Ignore symlink to i386 includes 2022-08-02 16:34:23 -07:00
Kbuild.in Zstd: Integrate v1.5.7 into the ZFS build system 2026-01-20 13:41:06 -08:00
Makefile.bsd Zstd: Integrate v1.5.7 into the ZFS build system 2026-01-20 13:41:06 -08:00
Makefile.in Fix --enable-invariants on FreeBSD 2026-01-14 14:54:12 -08:00