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>
This commit is contained in:
parent
ecefbd94b8
commit
6f5601251d
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user