Page MenuHomeFreeBSD

vmm: release the lock when vrtc_snapshot() fails
AcceptedPublic

Authored by wanpengqian_gmail.com on Fri, Oct 2, 8:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 11, 1:28 PM
Unknown Object (File)
Sat, Oct 10, 12:53 PM
Unknown Object (File)
Sat, Oct 10, 12:53 PM
Unknown Object (File)
Sat, Oct 10, 5:46 AM
Unknown Object (File)
Fri, Oct 9, 8:30 PM
Unknown Object (File)
Fri, Oct 9, 8:12 AM
Unknown Object (File)
Fri, Oct 9, 1:33 AM
Unknown Object (File)
Fri, Oct 9, 1:07 AM
Subscribers

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