[Patch] Fix a race condition in pty.c
From: Zou, Nanhai
Date: Thu Dec 16 2004 - 22:09:19 EST
<<pty_close-race-fix.patch>> There is a race condition int pty.c
when pty_close wakes up waiter on its pair device before set
TTY_OTHER_CLOSED flag.
It is possible on SMP or preempt kernel, waiter wakes up too early that
it will not get TTY_OTHER_CLOSED flag then fall into sleep again.
Lu hong jiu report this bug will hang some expect scripts on SMP
machines.
Signed-off-by: Zou Nan hai <Nanhai.zou@xxxxxxxxx>
Zou Nan hai
Attachment:
pty_close-race-fix.patch
Description: pty_close-race-fix.patch