Date: Sun, 21 Dec 2008 21:16:57 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r186382 - head/sys/kern Message-ID: <200812212116.mBLLGvPj042566@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Sun Dec 21 21:16:57 2008 New Revision: 186382 URL: http://svn.freebsd.org/changeset/base/186382 Log: Set PTS_FINISHED before waking up any threads. Inside ptsdrv_{in,out}wakeup() we call KNOTE_LOCKED() to wake up any kevent(2) users. Because the kqueue handlers are executed synchronously, we must set PTS_FINISHED before calling ptsdrv_{in,out}wakeup(). Discovered by: nork Modified: head/sys/kern/tty_pts.c Modified: head/sys/kern/tty_pts.c ============================================================================== --- head/sys/kern/tty_pts.c Sun Dec 21 20:30:14 2008 (r186381) +++ head/sys/kern/tty_pts.c Sun Dec 21 21:16:57 2008 (r186382) @@ -630,10 +630,9 @@ ptsdrv_close(struct tty *tp) struct pts_softc *psc = tty_softc(tp); /* Wake up any blocked readers/writers. */ + psc->pts_flags |= PTS_FINISHED; ptsdrv_outwakeup(tp); ptsdrv_inwakeup(tp); - - psc->pts_flags |= PTS_FINISHED; } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812212116.mBLLGvPj042566>