From 114c4a90f781e8e968fbe9f65d449c86506d334c Mon Sep 17 00:00:00 2001 From: tsutsui Date: Sat, 29 Mar 2014 16:46:19 +0000 Subject: [PATCH] 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 --- sys/arch/atari/dev/event_var.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/arch/atari/dev/event_var.h b/sys/arch/atari/dev/event_var.h index 3afedfeacb05..0acfd620d631 100644 --- a/sys/arch/atari/dev/event_var.h +++ b/sys/arch/atari/dev/event_var.h @@ -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 *);