Skip to content

Commit b3868e2

Browse files
peterhurleygregkh
authored andcommitted
n_tty: Remove reader wakeups for TTY_BREAK/TTY_PARITY chars
Waking the reader immediately upon receipt of TTY_BREAK or TTY_PARITY chars has no effect on the outcome of read(): 1. Only non-canonical/EXTPROC mode applies since canonical mode will not return data until a line termination is received anyway 2. EXTPROC mode - the reader will always be woken by the input worker 3. Non-canonical modes a. MIN == 0, TIME == 0 b. MIN == 0, TIME > 0 c. MIN > 0, TIME > 0 minimum_to_wake is always 1 in these modes so the reader will always be woken by the input worker d. MIN > 0, TIME == 0 although the reader will not be woken by the input worker unless the minimum data is received, the reader would not otherwise have returned the received data Signed-off-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4bd0162 commit b3868e2

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/tty/n_tty.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,8 +1179,6 @@ static void n_tty_receive_break(struct tty_struct *tty)
11791179
put_tty_queue('\0', ldata);
11801180
}
11811181
put_tty_queue('\0', ldata);
1182-
if (waitqueue_active(&tty->read_wait))
1183-
wake_up_interruptible_poll(&tty->read_wait, POLLIN);
11841182
}
11851183

11861184
/**
@@ -1237,8 +1235,6 @@ static void n_tty_receive_parity_error(struct tty_struct *tty, unsigned char c)
12371235
put_tty_queue('\0', ldata);
12381236
} else
12391237
put_tty_queue(c, ldata);
1240-
if (waitqueue_active(&tty->read_wait))
1241-
wake_up_interruptible_poll(&tty->read_wait, POLLIN);
12421238
}
12431239

12441240
static void

0 commit comments

Comments
 (0)