summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_teql.c
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2019-09-16 16:12:23 -0700
committerBen Hutchings <ben@decadent.org.uk>2019-12-19 15:58:11 +0000
commited5da1455def82331805e192c03e4eb909276257 (patch)
treec49306e2fadcf836ceb657b93dff47f4a59c44ab /net/sched/sch_teql.c
parent6e6d80f302ad1fcc3ef3b290d9796cbad2bd1a5e (diff)
downloadlinux-stable-ed5da1455def82331805e192c03e4eb909276257.tar.gz
linux-stable-ed5da1455def82331805e192c03e4eb909276257.tar.bz2
linux-stable-ed5da1455def82331805e192c03e4eb909276257.zip
serial: uartlite: fix exit path null pointer
commit a553add0846f355a28ed4e81134012e4a1e280c2 upstream. 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 <rdunlap@infradead.org> Cc: Peter Korsgaard <jacmet@sunsite.dk> Link: https://lore.kernel.org/r/9c8e6581-6fcc-a595-0897-4d90f5d710df@infradead.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/sched/sch_teql.c')
0 files changed, 0 insertions, 0 deletions