Page MenuHomeFreeBSD

vt(4): Fix a LOR in vt_allocate()
ClosedPublic

Authored by dumbbell on Sep 15 2014, 9:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 30, 7:18 PM
Unknown Object (File)
Tue, Dec 24, 2:44 PM
Unknown Object (File)
Nov 19 2024, 5:00 PM
Unknown Object (File)
Oct 27 2024, 3:33 AM
Unknown Object (File)
Oct 27 2024, 3:33 AM
Unknown Object (File)
Oct 27 2024, 3:32 AM
Unknown Object (File)
Oct 4 2024, 5:52 PM
Unknown Object (File)
Oct 3 2024, 8:39 PM
Subscribers
None

Details

Summary

When we load a KMS driver, the following LOR is reported:

lock order reversal:
 1st 0xffffffff8084bab8 vtdev (vtdev) @ /usr/home/kostik/work/build/bsd/DEV/src/sys/dev/vt/vt_core.c:2322
 2nd 0xfffff8000d69ac08 ttymtx (ttymtx) @ /usr/home/kostik/work/build/bsd/DEV/src/sys/kern/subr_terminal.c:236

See Bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193597

This patch moves VT_LOCK(vd) after the call to terminal_mute(). The call to vt_suspend_flush_timer() is now outside the lock, but this function already uses an atomic cmpset to protect itself.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

dumbbell retitled this revision from to vt(4): Fix a LOR in vt_allocate().
dumbbell updated this object.
dumbbell edited the test plan for this revision. (Show Details)
dumbbell added reviewers: emaste, ray, nwhitehorn.
ray edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Sep 15 2014, 1:38 PM

Committed in r271682. Thanks!