diff options
author | Sasha Levin <sasha.levin@oracle.com> | 2012-10-05 02:01:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-05 18:26:01 +0200 |
commit | 6f5601251d7e306b8a7bf5e674c5307d865c0fa1 (patch) | |
tree | 55f3e550181d02ecc8dfe7d09a292c98ece96469 /net/irda | |
parent | Merge tag 'kvm-3.7-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm (diff) | |
download | linux-6f5601251d7e306b8a7bf5e674c5307d865c0fa1.tar.xz linux-6f5601251d7e306b8a7bf5e674c5307d865c0fa1.zip |
net, TTY: initialize tty->driver_data before usage
Commit 9c650ffc ("TTY: ircomm_tty, add tty install") split _open() to
_install() and _open(). It also moved the initialization of driver_data
out of open(), but never added it to install() - causing a NULL ptr
deref whenever the driver was used.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/irda')
-rw-r--r-- | net/irda/ircomm/ircomm_tty.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c index 95a3a7a336ba..496ce2cebcd7 100644 --- a/net/irda/ircomm/ircomm_tty.c +++ b/net/irda/ircomm/ircomm_tty.c @@ -421,6 +421,8 @@ static int ircomm_tty_install(struct tty_driver *driver, struct tty_struct *tty) hashbin_insert(ircomm_tty, (irda_queue_t *) self, line, NULL); } + tty->driver_data = self; + return tty_port_install(&self->port, driver, tty); } |