mirror of
https://github.com/opnsense/src.git
synced 2026-04-26 00:27:08 -04:00
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
This commit is contained in:
parent
e9f541267d
commit
67dd0ccbee
1 changed files with 1 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue