[PATCH] tty_io: fix race in master pty close/slave pty close path