Module Name: src
Committed By: christos
Date: Sun Oct 4 22:24:15 UTC 2009
Modified Files:
src/sys/dev/wscons: wsdisplay_compat_usl.c
Log Message:
Don't call usl_sync_check_sig from an interrupt context. Call it only if waitok.
Stack trace: mutex_vector_enter <- usl_sync_check_sig <- usl_detachproc <-
wsdisplay_switch <- wskbd_translate <- wskbd_input <-
pckbd_input <- pckbcintr <- intr_biglock_wrapper <-
Xintr_ioapic_edge1
Reported by Anon Ymous
To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/wscons/wsdisplay_compat_usl.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/dev/wscons/wsdisplay_compat_usl.c
diff -u src/sys/dev/wscons/wsdisplay_compat_usl.c:1.45 src/sys/dev/wscons/wsdisplay_compat_usl.c:1.46
--- src/sys/dev/wscons/wsdisplay_compat_usl.c:1.45 Thu Apr 24 11:35:28 2008
+++ src/sys/dev/wscons/wsdisplay_compat_usl.c Sun Oct 4 18:24:15 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay_compat_usl.c,v 1.45 2008/04/24 15:35:28 ad Exp $ */
+/* $NetBSD: wsdisplay_compat_usl.c,v 1.46 2009/10/04 22:24:15 christos Exp $ */
/*
* Copyright (c) 1998
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay_compat_usl.c,v 1.45 2008/04/24 15:35:28 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay_compat_usl.c,v 1.46 2009/10/04 22:24:15 christos Exp $");
#include "opt_compat_freebsd.h"
#include "opt_compat_netbsd.h"
@@ -191,8 +191,10 @@
*/
sd->s_callback = callback;
sd->s_cbarg = cbarg;
- if (!usl_sync_check_sig(sd, sd->s_relsig, SF_DETACHPENDING))
- return (0);
+ if (waitok) {
+ if (!usl_sync_check_sig(sd, sd->s_relsig, SF_DETACHPENDING))
+ return (0);
+ }
callout_schedule(&sd->s_detach_ch, wscompat_usl_synctimeout * hz);
return (EAGAIN);