svn commit: r186382 - head/sys/kern
Ed Schouten
ed at FreeBSD.org
Sun Dec 21 21:16:57 UTC 2008
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
More information about the svn-src-head
mailing list