]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
fb_set_suspend() must be called with the console semaphore held, which
authorAndrea Righi <arighi@develer.com>
Tue, 26 Jul 2011 10:14:44 +0000 (20:14 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 2 Aug 2011 05:14:19 +0000 (15:14 +1000)
commitf4f96610d060b34e34a7103c334c92b8d983964c
treee5a75f5308459b64de45af0c2f4579adba596a4d
parent8e75d6e220b6752dfe7c97b01b4bbffbda4813fa
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