Module Name: src
Committed By: sborrill
Date: Fri Feb 21 12:27:28 UTC 2014
Modified Files:
src/sys/arch/atari/dev [netbsd-6-0]: ite.c
Log Message:
Pull up the following revisions(s) (requested by tsutsui in ticket #1033):
sys/arch/atari/dev/ite.c: revision 1.72
Fix kernel crash when a user tries to switch to nonexistent terminal.
Fixes PR/48599.
To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.71.14.1 src/sys/arch/atari/dev/ite.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/atari/dev/ite.c
diff -u src/sys/arch/atari/dev/ite.c:1.71 src/sys/arch/atari/dev/ite.c:1.71.14.1
--- src/sys/arch/atari/dev/ite.c:1.71 Sun Jun 5 16:25:12 2011
+++ src/sys/arch/atari/dev/ite.c Fri Feb 21 12:27:28 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: ite.c,v 1.71 2011/06/05 16:25:12 tsutsui Exp $ */
+/* $NetBSD: ite.c,v 1.71.14.1 2014/02/21 12:27:28 sborrill Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.71 2011/06/05 16:25:12 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.71.14.1 2014/02/21 12:27:28 sborrill Exp $");
#include "opt_ddb.h"
@@ -665,8 +665,8 @@ ite_switch(int unit)
struct ite_softc *sc;
extern const struct cdevsw view_cdevsw;
- sc = getitesp(unit);
- if ((sc->flags & (ITE_ATTACHED | ITE_INITED)) == 0)
+ sc = device_lookup_private(&ite_cd, unit);
+ if (sc == NULL || (sc->flags & (ITE_ATTACHED | ITE_INITED)) == 0)
return;
/*