tty/hvc_console: fix console lock ordering with spinlock
authorDenis Kirjanov <kda@linux-powerpc.org>
Thu, 30 Mar 2017 14:06:19 +0000 (10:06 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 Mar 2017 09:37:13 +0000 (11:37 +0200)
commit19fa6e601b251f13400767813372944b3e2f444b
treef196d95a9163a964826db79b5a9d7b79fec06ffc
parent93857edd9829e144acb6c7e72d593f6e01aead66
tty/hvc_console: fix console lock ordering with spinlock

hvc_remove() takes a spin lock first then acquires the console
semaphore. This situation can easily lead to a deadlock scenario
where we call scheduler with spin lock held.

Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/hvc/hvc_console.c