diff options
author | bde <bde@FreeBSD.org> | 1996-05-01 03:58:21 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-05-01 03:58:21 +0000 |
commit | 3f15f680f268ab65ce298d3c496f1a9535155d41 (patch) | |
tree | e9cb10adb0ce9670b08323e01d3e1c1fa9e785ba /sys/isa | |
parent | 789804f74610f0b0fd1d15b3b2ed4b437927b3e9 (diff) | |
download | FreeBSD-src-3f15f680f268ab65ce298d3c496f1a9535155d41.zip FreeBSD-src-3f15f680f268ab65ce298d3c496f1a9535155d41.tar.gz |
Fixed a race that caused panics in kernel printfs when the screen timeout
routine changed the screen pointers while output was in progress.
Diffstat (limited to 'sys/isa')
-rw-r--r-- | sys/isa/syscons.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c index 9947f75..962aa9a 100644 --- a/sys/isa/syscons.c +++ b/sys/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.144 1996/03/27 19:11:41 bde Exp $ + * $Id: syscons.c,v 1.145 1996/04/26 06:45:41 sos Exp $ */ #include "sc.h" @@ -1215,6 +1215,7 @@ void sccnputc(dev_t dev, int c) { u_char buf[1]; + int s; scr_stat *scp = console[0]; term_stat save = scp->term; @@ -1227,7 +1228,8 @@ sccnputc(dev_t dev, int c) kernel_console = scp->term; current_default = &user_default; scp->term = save; - if (scp == cur_console /* && scrn_timer not running */) { + s = splclock(); /* XXX stop scrn_timer */ + if (scp == cur_console) { if (scp->scr_buf != Crtat && (scp->start <= scp->end)) { bcopyw(scp->scr_buf + scp->start, Crtat + scp->start, (1 + scp->end - scp->start) * sizeof(u_short)); @@ -1237,6 +1239,7 @@ sccnputc(dev_t dev, int c) } draw_cursor(scp, TRUE); } + splx(s); } int |