zfs
zfs copied to clipboard
FreeBSD: Fix a lock leak in zvol_geom_open()
This fixes a straightforward locking bug in zvol_geom_open().
Motivation and Context
I hit a panic while running ZFS tests on arm64, caused by zvol_geom_open() trying to unlock zv->zv_suspend_lock
even though zv
was NULL.
Description
There is some tricky deadlock avoidance code in this function, it failed to update a flag after dropping the suspend lock. Apply the minimal change required to fix that bug.
How Has This Been Tested?
Re-run the test suite on arm64.
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Performance enhancement (non-breaking change which improves efficiency)
- [ ] Code cleanup (non-breaking change which makes code smaller or more readable)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
- [ ] Documentation (a change to man pages or other documentation)
Checklist:
- [x] My code follows the OpenZFS code style requirements.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the contributing document.
- [ ] I have added tests to cover my changes.
- [ ] I have run the ZFS Test Suite with this change applied.
- [x] All commit messages are properly formatted and contain
Signed-off-by
.