Geert Uytterhoeven a684e7d330 fbdev: fix fb_compat_ioctl() deadlocks
commit 3e680aae4e53ab54cdbb0c29257dae0cbb158e1c ("fb: convert
lock/unlock_kernel() into local fb mutex") introduced several deadlocks
in the fb_compat_ioctl() path, as mutex_lock() doesn't allow recursion,
unlike lock_kernel().  This broke frame buffer applications on 64-bit
systems with a 32-bit userland.

commit 120a37470c2831fea49fdebaceb5a7039f700ce6 ("framebuffer compat_ioctl
deadlock") fixed one of the deadlocks.

This patch fixes the remaining deadlocks:
  - Revert commit 120a37470c2831fea49fdebaceb5a7039f700ce6,
  - Extract the core logic of fb_ioctl() into a new function do_fb_ioctl(),
  - Change all callsites of fb_ioctl() where info->lock is already held to
    call do_fb_ioctl() instead,
  - Add sparse annotations to all routines that take info->lock.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Mikulas Patocka <mpatocka@redhat.com>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-06 15:41:19 -08:00
..
2008-07-24 10:47:40 -07:00
2008-10-16 11:21:45 -07:00
2008-03-10 18:01:20 -07:00
2008-04-28 08:58:38 -07:00
2008-07-24 10:47:37 -07:00
2008-10-30 11:38:45 -07:00
2008-07-24 10:47:40 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-10-18 14:37:17 -07:00
2008-07-20 17:24:39 -07:00
2008-07-24 10:47:34 -07:00
2008-11-01 12:40:38 -07:00
2008-02-03 17:31:49 +02:00
2008-05-18 13:28:49 -07:00
2008-11-06 15:41:19 -08:00
2007-05-08 11:15:26 -07:00
2008-07-30 09:41:47 -07:00
2008-04-28 08:58:35 -07:00
2008-02-06 10:41:16 -08:00
2008-07-26 12:00:12 -07:00
2008-06-06 11:29:12 -07:00
2008-04-28 08:58:41 -07:00
2008-10-16 11:21:42 -07:00
2007-10-16 09:43:20 -07:00
2008-07-24 10:47:37 -07:00
2008-07-26 12:00:12 -07:00
2007-10-16 09:43:22 -07:00
2008-10-16 11:21:42 -07:00
2007-05-08 11:15:32 -07:00
2008-07-04 10:40:08 -07:00