summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2003-10-29 20:48:13 +0000
committernjl <njl@FreeBSD.org>2003-10-29 20:48:13 +0000
commit3fd708125c90c5c1c6c1b580faeed27376b68952 (patch)
tree34a955c1bf129794410c93ede2d478d15231c5b9 /sys
parentedb6523b57994eafd624cc470efad96c1ea66c4e (diff)
downloadFreeBSD-src-3fd708125c90c5c1c6c1b580faeed27376b68952.zip
FreeBSD-src-3fd708125c90c5c1c6c1b580faeed27376b68952.tar.gz
Fix a panic that occurs when resuming. For some reason, sc->cur_scp is
NULL. Submitted by: Andrew Thompson <andy@fud.org.nz>
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/syscons/syscons.c3
-rw-r--r--sys/isa/syscons_isa.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 17daf5d..da76ed3 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -2147,6 +2147,9 @@ sc_switch_scr(sc_softc_t *sc, u_int next_scr)
DPRINTF(5, ("sc0: sc_switch_scr() %d ", next_scr + 1));
+ if (sc->cur_scp == NULL)
+ return (0);
+
/* prevent switch if previously requested */
if (sc->flags & SC_SCRN_VTYLOCK) {
sc_bell(sc->cur_scp, sc->cur_scp->bell_pitch,
diff --git a/sys/isa/syscons_isa.c b/sys/isa/syscons_isa.c
index d88da89..58118d2 100644
--- a/sys/isa/syscons_isa.c
+++ b/sys/isa/syscons_isa.c
@@ -108,6 +108,10 @@ scsuspend(device_t dev)
sc_softc_t *sc;
sc = &main_softc;
+
+ if (sc->cur_scp == NULL)
+ return (0);
+
sc_cur_scr = sc->cur_scp->index;
if (sc_no_suspend_vtswitch)
OpenPOWER on IntegriCloud