]> 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, 3 Aug 2011 00:52:39 +0000 (10:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 19 Aug 2011 02:31:15 +0000 (12:31 +1000)
commit759705a017238d80445d1a0c113fa48d152690ef
treecde09bae4bb41a41940eb32e383eceb7121ad8d7
parentf2b2f83fb0dd2c541a796280873b769c4f7823f5
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