Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F96980266
D42750.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D42750.diff
View Options
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -275,6 +275,7 @@
&vt_consdev);
static bool inside_vt_flush = false;
+static bool inside_vt_window_switch = false;
/* Initialize locks/mem depended members. */
static void
@@ -564,6 +565,11 @@
struct vt_window *curvw = vd->vd_curwindow;
keyboard_t *kbd;
+ if (inside_vt_window_switch && KERNEL_PANICKED())
+ return (0);
+
+ inside_vt_window_switch = true;
+
if (kdb_active) {
/*
* When grabbing the console for the debugger, avoid
@@ -575,13 +581,16 @@
*/
if (curvw == vw)
return (0);
- if (!(vw->vw_flags & (VWF_OPENED|VWF_CONSOLE)))
+ if (!(vw->vw_flags & (VWF_OPENED|VWF_CONSOLE))) {
+ inside_vt_window_switch = false;
return (EINVAL);
+ }
vd->vd_curwindow = vw;
vd->vd_flags |= VDF_INVALID;
if (vd->vd_driver->vd_postswitch)
vd->vd_driver->vd_postswitch(vd);
+ inside_vt_window_switch = false;
return (0);
}
@@ -595,10 +604,12 @@
if ((kdb_active || KERNEL_PANICKED()) &&
vd->vd_driver->vd_postswitch)
vd->vd_driver->vd_postswitch(vd);
+ inside_vt_window_switch = false;
VT_UNLOCK(vd);
return (0);
}
if (!(vw->vw_flags & (VWF_OPENED|VWF_CONSOLE))) {
+ inside_vt_window_switch = false;
VT_UNLOCK(vd);
return (EINVAL);
}
@@ -627,6 +638,7 @@
mtx_unlock(&Giant);
DPRINTF(10, "%s(ttyv%d) done\n", __func__, vw->vw_number);
+ inside_vt_window_switch = false;
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 28, 8:50 AM (3 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13006135
Default Alt Text
D42750.diff (1 KB)
Attached To
Mode
D42750: vt(4): Skip vt_window_switch() for nested panics
Attached
Detach File
Event Timeline
Log In to Comment