mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 17:50:54 +07:00
tty: Allow uart_register/unregister/register
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> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1541f845d1
commit
1e66cded33
@ -2282,6 +2282,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…
Reference in New Issue
Block a user