tty: Allow uart_register/unregister/register
commit 1e66cded33 upstream.
This is legitimate but because we don't clear the drv->state pointer in the
unregister code causes a bogus BUG().
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=42880
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e9fecd74e4
commit
3c867337cd
1 changed files with 1 additions and 0 deletions
|
|
@ -2325,6 +2325,7 @@ void uart_unregister_driver(struct uart_driver *drv)
|
|||
tty_unregister_driver(p);
|
||||
put_tty_driver(p);
|
||||
kfree(drv->state);
|
||||
drv->state = NULL;
|
||||
drv->tty_driver = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue