diff options
author | Randy Dunlap <[email protected]> | 2019-09-16 16:12:23 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2019-10-04 15:02:46 +0200 |
commit | a553add0846f355a28ed4e81134012e4a1e280c2 (patch) | |
tree | e43a77232310ce392d7e1291062772f1dc7e3326 /tools/perf/util/trace-event-scripting.c | |
parent | 9050079719021776e48437827eb9d5986b6e45d4 (diff) |
serial: uartlite: fix exit path null pointer
Call uart_unregister_driver() conditionally instead of
unconditionally, only if it has been previously registered.
This uses driver.state, just as the sh-sci.c driver does.
Fixes this null pointer dereference in tty_unregister_driver(),
since the 'driver' argument is null:
general protection fault: 0000 [#1] PREEMPT SMP KASAN PTI
RIP: 0010:tty_unregister_driver+0x25/0x1d0
Fixes: 238b8721a554 ("[PATCH] serial uartlite driver")
Signed-off-by: Randy Dunlap <[email protected]>
Cc: stable <[email protected]>
Cc: Peter Korsgaard <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions