summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2009-04-02 01:30:04 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-01 14:50:48 -0700
commit833bb3046b6cb320e775ea2160ddca87d53260d5 (patch)
treede206436200246909246f9e0df27e4cced13e364
parent8b53ef33d9d8fa5f771ae11cc6a6e7bc0182beec (diff)
downloadlinux-3.10-833bb3046b6cb320e775ea2160ddca87d53260d5.tar.gz
linux-3.10-833bb3046b6cb320e775ea2160ddca87d53260d5.tar.bz2
linux-3.10-833bb3046b6cb320e775ea2160ddca87d53260d5.zip
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>
-rw-r--r--drivers/serial/serial_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index bf3c0e32a33..b0bb29d804a 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -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;