]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fb_set_suspend() must be called with the console semaphore held, which
authorAndrea Righi <arighi@develer.com>
Wed, 24 Aug 2011 23:46:21 +0000 (09:46 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 27 Sep 2011 06:58:47 +0000 (16:58 +1000)
commitd287dbd9f27dd4971ab30d52108b8054d992dbe6
treef6840adb432c02c1ab4a8be7a1807a0288a0e0bc
parent7e212de828a3fc6b2fdbb45c297d052c40332b55
fb_set_suspend() must be called with the console semaphore held, which
means the code path coming in here will first take the console_lock() and
then call lock_fb_info().

However several framebuffer ioctl commands acquire these locks in reverse
order (lock_fb_info() and then console_lock()).  This gives rise to
potential AB-BA deadlock.

Fix this by changing the order of acquisition in the ioctl commands that
make use of console_lock().

Signed-off-by: Andrea Righi <arighi@develer.com>
Reported-by: Peter Nordström (Palm GBU) <peter.nordstrom@palm.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/video/fbmem.c