Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/wscons Don't call usl_sync_check_sig from an interru...



details:   https://anonhg.NetBSD.org/src/rev/0aca1d062016
branches:  trunk
changeset: 747895:0aca1d062016
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Oct 04 22:24:15 2009 +0000

description:
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

diffstat:

 sys/dev/wscons/wsdisplay_compat_usl.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 26a2997eb21e -r 0aca1d062016 sys/dev/wscons/wsdisplay_compat_usl.c
--- a/sys/dev/wscons/wsdisplay_compat_usl.c     Sun Oct 04 22:11:39 2009 +0000
+++ b/sys/dev/wscons/wsdisplay_compat_usl.c     Sun Oct 04 22:24:15 2009 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index