Skip to content

Commit 833bb30

Browse files
Alexey Dobriyantorvalds
authored andcommitted
serial: fixup /proc/tty/driver/serial after proc_fops conversion
"struct tty_driver *" lies in m->private not in v which is SEQ_TOKEN_START which is 1 which is enough to trigger NULL dereference next line: BUG: unable to handle kernel NULL pointer dereference at 000000ad IP: [<c040d689>] uart_proc_show+0xe/0x2b0 Noticed by Linus. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 8b53ef3 commit 833bb30

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/serial/serial_core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1765,7 +1765,7 @@ static void uart_line_info(struct seq_file *m, struct uart_driver *drv, int i)
17651765

17661766
static int uart_proc_show(struct seq_file *m, void *v)
17671767
{
1768-
struct tty_driver *ttydrv = v;
1768+
struct tty_driver *ttydrv = m->private;
17691769
struct uart_driver *drv = ttydrv->driver_state;
17701770
int i;
17711771

0 commit comments

Comments
 (0)