Page MenuHomeFreeBSD

vt: drop the lock before calling vd_postswitch
AcceptedPublic

Authored by kevans on Jan 10 2025, 4:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 21, 2:04 PM
Unknown Object (File)
Apr 11 2026, 9:44 PM
Unknown Object (File)
Apr 5 2026, 7:01 PM
Unknown Object (File)
Mar 27 2026, 5:27 AM
Unknown Object (File)
Feb 20 2026, 5:26 PM
Unknown Object (File)
Dec 1 2025, 3:32 PM
Unknown Object (File)
Nov 28 2025, 6:26 PM
Unknown Object (File)
Nov 12 2025, 12:26 AM
Subscribers

Details

Reviewers
emaste
manu
jhb
Summary

Some postswitch methods, e.g., from i915kms, don't currently expect to
be called under a lock and may try to sleep. The expectation seems OK,
we usually do drop the lock prior to calling vd_postswitch, so let's
avoid an unnecessary panic and drop the lock earlier..

Diff Detail

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

Event Timeline

jhb added inline comments.
sys/dev/vt/vt_core.c
625

Notably, we drop the VT lock before postswitch here already. Might be worth calling out that you are fixing a special case to follow the same behavior as the more general case. Probably the special cal to vd_postswitch was added later and that later commit just got the locking wrong.

This revision is now accepted and ready to land.Jan 10 2025, 12:15 PM