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-10-16 11:21:44 -07:00
2008-10-29 11:45:37 +08:00
2008-10-30 11:38:46 -07:00
2008-10-16 09:24:45 -07:00
2008-07-24 10:47:40 -07:00
2008-03-19 18:53:36 -07:00
2008-10-16 11:21:42 -07:00
2007-10-16 09:43:17 -07:00
2008-05-14 19:11:14 -07:00
2008-10-16 11:21:45 -07:00
2008-11-06 15:41:18 -08:00
2008-03-10 18:01:20 -07:00
2008-04-28 08:58:42 -07:00
2008-10-16 11:25:32 -07:00
2008-08-07 09:55:48 +01:00
2008-04-28 08:58:42 -07:00
2008-04-28 08:58:38 -07:00
2008-07-24 10:47:37 -07:00
2008-08-23 12:14:12 -07:00
2008-10-30 11:38:45 -07:00
2007-07-17 10:23:11 -07:00
2008-08-07 09:55:48 +01:00
2007-07-19 10:04:50 -07:00
2008-07-24 10:47:40 -07:00
2007-10-16 09:43:17 -07:00
2008-08-23 12:14:12 -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
2008-07-24 10:47:37 -07:00
2007-05-04 17:59:05 -07:00
2008-10-16 11:21:44 -07:00
2007-10-18 14:37:17 -07:00
2007-07-19 10:04:50 -07:00
2008-08-27 10:51:02 +08:00
2008-07-24 10:47:40 -07:00
2008-08-31 01:23:17 -07:00
2008-07-20 17:24:39 -07:00
2008-07-24 10:47:34 -07:00
2008-10-16 11:21:45 -07:00
2008-07-24 10:47:34 -07:00
2008-04-28 08:58:35 -07:00
2008-04-28 08:58:35 -07:00
2008-04-28 08:58:42 -07:00
2008-08-31 01:23:17 -07:00
2008-10-10 12:12:41 -07:00
2008-08-31 01:23:17 -07:00
2008-02-23 10:40:04 -08:00
2008-11-01 12:40:38 -07:00
2008-08-07 09:55:48 +01:00
2008-07-24 10:47:40 -07:00
2007-07-17 10:23:11 -07:00
2008-08-07 09:55:48 +01:00
2008-02-03 17:31:49 +02:00
2008-05-18 13:28:49 -07:00
2008-10-16 11:21:44 -07:00
2008-08-07 09:55:48 +01:00
2008-07-14 22:38:28 +02:00
2008-08-20 15:40:32 -07:00
2008-04-28 08:58:35 -07:00
2007-10-16 09:43:17 -07:00
2007-10-16 09:43:17 -07:00
2008-11-06 15:41:19 -08:00
2008-10-16 11:21:44 -07:00
2007-05-08 11:15:26 -07:00
2008-08-31 01:23:17 -07:00
2007-07-17 10:23:12 -07:00
2008-08-15 08:35:43 -07:00
2008-04-28 08:58:40 -07:00
2007-05-02 19:02:35 -07:00
2008-07-30 09:41:47 -07:00
2008-04-28 08:58:35 -07:00
2008-04-28 08:58:41 -07:00
2008-07-24 10:47:39 -07:00
2008-07-30 02:16:12 +09:00
2008-05-18 13:28:50 -07:00
2008-02-06 10:41:16 -08:00
2008-04-28 08:58:42 -07:00
2008-08-07 09:55:48 +01:00
2008-11-06 15:41:18 -08:00
2008-10-10 12:13:22 -07:00
2008-07-26 12:00:12 -07:00
2007-07-17 10:23:13 -07:00
2007-07-17 10:23:13 -07:00
2008-11-06 15:41:18 -08:00
2007-02-14 08:09:54 -08:00
2008-10-15 10:19:51 -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
2008-07-22 10:39:36 +10:00
2007-10-12 14:51:04 -07:00
2008-08-31 01:23:17 -07:00
2008-06-09 13:46:38 +10:00
2008-08-20 15:40:31 -07:00
2008-04-28 08:58:42 -07:00
2008-02-06 10:41:18 -08:00
2007-10-16 09:43:19 -07:00
2007-10-16 09:43:20 -07:00
2008-07-22 10:39:33 +10:00
2008-07-29 22:10:01 +09:00
2008-08-16 16:39:16 +01:00
2008-07-24 10:47:37 -07:00
2007-07-17 10:23:12 -07:00
2008-10-16 11:21:45 -07:00
2008-08-07 09:55:48 +01:00
2008-05-24 09:56:13 -07:00
2008-08-23 12:14:12 -07:00
2008-08-07 09:55:48 +01:00
2008-07-24 10:47:37 -07:00
2008-05-08 21:37:30 -07:00
2008-05-08 21:37:30 -07:00
2008-07-10 18:55:40 +02:00
2008-07-28 16:30:21 -07:00
2008-10-20 11:38:50 +09:00
2008-07-24 10:47:39 -07:00
2008-07-24 10:47:40 -07:00
2008-04-28 08:58:42 -07:00
2008-07-26 12:00:12 -07:00
2008-07-26 12:00:12 -07:00
2008-05-08 21:37:30 -07:00
2008-05-08 21:37:30 -07:00
2007-10-16 09:43:22 -07:00
2008-04-28 08:58:35 -07:00
2008-04-28 08:58:35 -07:00
2008-04-28 08:58:42 -07:00
2008-08-31 01:23:17 -07:00
2008-10-16 11:21:42 -07:00
2007-10-16 09:43:23 -07:00
2008-10-16 11:21:45 -07:00
2008-07-24 10:47:36 -07:00
2008-10-16 11:21:44 -07:00
2007-07-19 10:04:50 -07:00
2008-07-24 10:47:39 -07:00
2008-10-16 11:21:42 -07:00
2007-05-08 11:15:32 -07:00
2008-08-23 12:14:12 -07:00
2008-07-04 10:40:08 -07:00
2008-08-20 12:40:07 +02:00
2008-08-23 12:14:12 -07:00