Page MenuHomeFreeBSD

vt: drop the lock before calling vd_postswitch
AcceptedPublic

Authored by kevans on Fri, Jan 10, 4:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 25, 1:54 PM
Unknown Object (File)
Thu, Jan 23, 6:09 PM
Unknown Object (File)
Mon, Jan 20, 5:59 AM
Unknown Object (File)
Tue, Jan 14, 5:11 PM
Unknown Object (File)
Fri, Jan 10, 7:57 PM
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.Fri, Jan 10, 12:15 PM