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:
1541f84
)
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>
Mon, 14 May 2012 16:04:28 +0000
(09:04 -0700)
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>
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 59fb3ba1e7cace8eec241685c35bf41155e243c7..a21dc8e3b7c0cf56ed808e006499abf4b661a217 100644
(file)
--- a/
drivers/tty/serial/serial_core.c
+++ b/
drivers/tty/serial/serial_core.c
@@
-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;
}