Skip to content

Commit

Permalink
serial: fixup /proc/tty/driver/serial after proc_fops conversion
Browse files Browse the repository at this point in the history
"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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alexey Dobriyan authored and torvalds committed Apr 1, 2009
1 parent 8b53ef3 commit 833bb30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1765,7 +1765,7 @@ static void uart_line_info(struct seq_file *m, struct uart_driver *drv, int i)

static int uart_proc_show(struct seq_file *m, void *v)
{
struct tty_driver *ttydrv = v;
struct tty_driver *ttydrv = m->private;
struct uart_driver *drv = ttydrv->driver_state;
int i;

Expand Down

0 comments on commit 833bb30

Please sign in to comment.