fb: rework locking to fix lock ordering on takeover
authorAlan Cox <alan@linux.intel.com>
Fri, 25 Jan 2013 00:28:15 +0000 (10:28 +1000)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 6 Mar 2013 03:23:52 +0000 (03:23 +0000)
commitda4a8acdf96e6744028f7e0429d47edad1bd7e28
tree59b53faab64ce68a6b590d9fa6b3ea2d119dc221
parentfab58c4dc8da9983c88357da7455955e1fa05c38
fb: rework locking to fix lock ordering on takeover

commit 50e244cc793d511b86adea24972f3a7264cae114 upstream.

Adjust the console layer to allow a take over call where the caller
already holds the locks.  Make the fb layer lock in order.

This is partly a band aid, the fb layer is terminally confused about the
locking rules it uses for its notifiers it seems.

[akpm@linux-foundation.org: remove stray non-ascii char, tidy comment]
[akpm@linux-foundation.org: export do_take_over_console()]
[airlied: cleanup another non-ascii char]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Jiri Kosina <jkosina@suse.cz>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/tty/vt/vt.c
drivers/video/console/fbcon.c
drivers/video/fbmem.c
drivers/video/fbsysfs.c
include/linux/console.h