Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x68k/dev Make sure to take proc_lock mutex on calli...



details:   https://anonhg.NetBSD.org/src/rev/5e1590d8c1e6
branches:  trunk
changeset: 781029:5e1590d8c1e6
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Wed Aug 15 19:13:58 2012 +0000

description:
Make sure to take proc_lock mutex on calling psignal(9) in EV_WAKEUP() macro
as sys/dev/sun/event_var.h does.
Fixes immediate KASSERT(mutex_owned(proc_lock)) panic during running Xserver
on DIAGNOSTIC kernel.

Should be pulled up to netbsd-6.

diffstat:

 sys/arch/x68k/dev/event_var.h |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r dfb09fda6954 -r 5e1590d8c1e6 sys/arch/x68k/dev/event_var.h
--- a/sys/arch/x68k/dev/event_var.h     Wed Aug 15 18:44:56 2012 +0000
+++ b/sys/arch/x68k/dev/event_var.h     Wed Aug 15 19:13:58 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: event_var.h,v 1.8 2008/03/01 14:16:50 rmind Exp $ */
+/*     $NetBSD: event_var.h,v 1.9 2012/08/15 19:13:58 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -67,8 +67,11 @@
                (ev)->ev_wanted = 0; \
                wakeup((void *)(ev)); \
        } \
-       if ((ev)->ev_async) \
+       if ((ev)->ev_async) { \
+               mutex_enter(proc_lock); \
                psignal((ev)->ev_io, SIGIO); \
+               mutex_exit(proc_lock); \
+       } \
 }
 
 void   ev_init(struct evvar *);



Home | Main Index | Thread Index | Old Index