"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>
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;