Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/atari/dev Fix kernel crash when a user tries to swi...
details: https://anonhg.NetBSD.org/src/rev/7e539b48cdcd
branches: trunk
changeset: 326813:7e539b48cdcd
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Wed Feb 19 11:40:31 2014 +0000
description:
Fix kernel crash when a user tries to switch to nonexistent terminal.
Reported by Gabor Sebestyen in PR port-atari/48599.
Should be pulled up to all netbsd-6 branches.
diffstat:
sys/arch/atari/dev/ite.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r ab4602c37d8a -r 7e539b48cdcd sys/arch/atari/dev/ite.c
--- a/sys/arch/atari/dev/ite.c Wed Feb 19 09:13:21 2014 +0000
+++ b/sys/arch/atari/dev/ite.c Wed Feb 19 11:40:31 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ite.c,v 1.71 2011/06/05 16:25:12 tsutsui Exp $ */
+/* $NetBSD: ite.c,v 1.72 2014/02/19 11:40:31 tsutsui 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.72 2014/02/19 11:40:31 tsutsui Exp $");
#include "opt_ddb.h"
@@ -665,8 +665,8 @@
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;
/*
Home |
Main Index |
Thread Index |
Old Index