Make sure to acquire proc_lock mutex on calling psignal(9) in EV_WAKEUP().

Without this, Xserver could cause panic on the DIAGNOSTIC kernel as x68k:
http://mail-index.netbsd.org/source-changes/2012/08/15/msg036632.html
This commit is contained in:
tsutsui 2014-03-29 16:46:19 +00:00
parent de089ddb26
commit 114c4a90f7
1 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: event_var.h,v 1.8 2009/03/14 14:45:56 dsl Exp $ */
/* $NetBSD: event_var.h,v 1.9 2014/03/29 16:46:19 tsutsui Exp $ */
/*
* Copyright (c) 1992, 1993
@ -69,8 +69,11 @@ struct evvar {
(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 *);