projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9fecd7
)
tty: Allow uart_register/unregister/register
author
Alan Cox
<alan@linux.intel.com>
Mon, 14 May 2012 13:51:22 +0000
(14:51 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 1 Jun 2012 07:12:56 +0000
(15:12 +0800)
commit
1e66cded334e6cea596c72f6f650eec351b1e959
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>
drivers/tty/serial/serial_core.c
patch
|
blob
|
history
diff --git
a/drivers/tty/serial/serial_core.c
b/drivers/tty/serial/serial_core.c
index 6bc20d77395e1ddbc39d298fd84c1f61be043180..de5e33fc129021be7bb7ff2ed8bde4b0f4de5552 100644
(file)
--- a/
drivers/tty/serial/serial_core.c
+++ b/
drivers/tty/serial/serial_core.c
@@
-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;
}