Page MenuHomeFreeBSD

vmm: release the lock when vrtc_snapshot() fails
AcceptedPublic

Authored by wanpengqian_gmail.com on Fri, Oct 2, 8:19 AM.

Details

Reviewers
jhb
markj
bnovkov
Group Reviewers
bhyve
Summary

The error path of the SNAPSHOT_*_OR_LEAVE() macros jumped past
VRTC_UNLOCK() and returned with the vrtc lock held.

Signed-off-by: Wanpeng Qian <wanpengqian@gmail.com>
Sponsored by: keelos.dev

Test Plan

By inspection. Compile-tested on main (f958aa7e7); the error path is not taken in normal use (it needs a snapshot buffer that is too small).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77607
Build 74490: arc lint + arc unit