remarkable-linux/drivers
Geert Uytterhoeven a684e7d330 fbdev: fix fb_compat_ioctl() deadlocks
commit 3e680aae4e ("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 120a37470c ("framebuffer compat_ioctl
deadlock") fixed one of the deadlocks.

This patch fixes the remaining deadlocks:
  - Revert commit 120a37470c,
  - 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
..
accessibility
acpi ACPI suspend: build fix for ACPI_SLEEP=n && XEN_SAVE_RESTORE=y. 2008-10-25 04:07:13 -04:00
amba
ata libata: mask off DET when restoring SControl for detach 2008-11-04 01:08:33 -05:00
atm
auxdisplay
base sysfs: Fix return values for sysdev_store_{ulong,int} 2008-10-29 15:03:49 -07:00
block cciss: fix regression firmware not displayed in procfs 2008-11-06 15:41:18 -08:00
bluetooth bpa10x: free sk_buff with kfree_skb 2008-10-31 00:40:19 -07:00
cdrom gdrom: Fix compile error 2008-10-28 17:46:02 +09:00
char vt: incomplete initialization of vc_tab_stop 2008-11-06 15:41:17 -08:00
clocksource
connector
cpufreq
cpuidle Merge branch 'v28-range-hrtimers-for-linus-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-10-23 10:53:02 -07:00
crypto
dca
dio
dma Merge branch 'i7300_idle' into release 2008-10-25 04:07:44 -04:00
edac edac: fix enabling of polling cell module 2008-10-30 11:38:46 -07:00
eisa
firewire firewire: fw-sbp2: fix races 2008-10-26 10:27:01 +01:00
firmware
gpio
gpu Merge branch 'io-mappings-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-11-03 10:15:40 -08:00
hid saner FASYNC handling on file close 2008-11-01 09:49:46 -07:00
hwmon hwmon: applesmc: add support for iMac 8 2008-11-06 15:41:17 -08:00
i2c i2c-s3c2410: Correct use of ! and & 2008-10-30 15:55:47 +01:00
ide ide-gd: re-get capacity on revalidate 2008-11-02 21:40:10 +01:00
idle i7300_idle: Cleanup based review comments 2008-10-24 12:55:14 -04:00
ieee1394 saner FASYNC handling on file close 2008-11-01 09:49:46 -07:00
infiniband saner FASYNC handling on file close 2008-11-01 09:49:46 -07:00
input saner FASYNC handling on file close 2008-11-01 09:49:46 -07:00
isdn
leds remove unused #include <version.h>'s 2008-11-01 09:50:12 -07:00
lguest
macintosh
mca
md Merge branch 'for-linus' of git://neil.brown.name/md 2008-10-30 18:36:16 -07:00
media
memstick
message saner FASYNC handling on file close 2008-11-01 09:49:46 -07:00
mfd missing dependencies on HAVE_CLK in drivers/mfd 2008-11-01 12:40:38 -07:00
misc remove unused #include <version.h>'s 2008-11-01 09:50:12 -07:00
mmc [ARM] 5322/1: Fix fastpath issue in mmci.c 2008-10-28 00:00:42 +00:00
mtd drivers: remove duplicated #include 2008-11-04 08:18:19 -08:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-11-04 08:30:12 -08:00
nubus
of OF-device: Don't overwrite numa_node in device registration 2008-10-31 16:12:01 +11:00
oprofile Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile 2008-10-23 10:05:40 -07:00
parisc
parport Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2008-10-30 12:52:53 -07:00
pci Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-10-30 12:09:44 -07:00
pcmcia Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-10-31 16:18:02 +09:00
pnp drivers: remove duplicated #include 2008-11-04 08:18:19 -08:00
power
ps3
rapidio
regulator regulator: da903x regulator bug fix 2008-10-30 15:31:35 +00:00
rtc rtc: fix handling of missing tm_year data when reading alarms 2008-11-06 15:41:17 -08:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-10-30 11:46:28 -07:00
sbus drivers: remove duplicated #include 2008-11-04 08:18:19 -08:00
scsi saner FASYNC handling on file close 2008-11-01 09:49:46 -07:00
serial Merge branch 'cris_move' of git://www.jni.nu/cris 2008-11-01 09:51:51 -07:00
sh
sn
spi
ssb
staging drivers: remove duplicated #include 2008-11-04 08:18:19 -08:00
tc
telephony saner FASYNC handling on file close 2008-11-01 09:49:46 -07:00
thermal
uio saner FASYNC handling on file close 2008-11-01 09:49:46 -07:00
usb saner FASYNC handling on file close 2008-11-01 09:49:46 -07:00
uwb
video fbdev: fix fb_compat_ioctl() deadlocks 2008-11-06 15:41:19 -08:00
virtio
w1
watchdog [PATCH] Switch all my contributions stuff to a single common address 2008-10-28 19:16:11 +00:00
xen drivers: remove duplicated #include 2008-11-04 08:18:19 -08:00
zorro
Kconfig regulator: Build on non-ARM platforms 2008-10-28 21:47:17 +00:00
Makefile Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb 2008-10-26 16:35:46 -07:00