svn commit: r186382 - head/sys/kern

[ Available lists | Index of svn-src-head | Month of Dec 2008 | Week of 21 Dec 2008 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Ed Schouten <ed@FreeBSD.org>
Date
21 Dec 2008 21:16:57
Subject
svn commit: r186382 - head/sys/kern
Message-ID
200812212116.mBLLGvPj042566@svn.freebsd.org


[ Hide this part ]
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


Elapsed time: 0.109 seconds