Revision c47747fde931c02455683bd00ea43eaa62f35b0e authored by Linus Torvalds on 11 May 2011, 21:58:34 UTC, committed by Linus Torvalds on 12 May 2011, 14:46:43 UTC
read/write/ioctl on a fbcon file descriptor has traditionally used the
fbcon not when it was opened, but as it was at the time of the call.
That makes no sense, but the lack of sense is much more obvious now that
we properly ref-count the usage - it means that the ref-counting doesn't
actually protect operations we do on the frame buffer.

This changes it to look at the fb_info that we got at open time, but in
order to avoid using a frame buffer long after it has been unregistered,
we do verify that it is still current, and return -ENODEV if not.

Acked-by: Tim Gardner <tim.gardner@canonical.com>
Tested-by: Daniel J Blueman <daniel.blueman@gmail.com>
Tested-by: Anca Emanuel <anca.emanuel@gmail.com>
Cc: Bruno Prémont <bonbons@linux-vserver.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Andy Whitcroft <andy.whitcroft@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 698b368
History
File Mode Size
Kconfig -rw-r--r-- 44.0 KB
Makefile -rw-r--r-- 1.0 KB
calibrate.c -rw-r--r-- 5.8 KB
do_mounts.c -rw-r--r-- 10.9 KB
do_mounts.h -rw-r--r-- 1.4 KB
do_mounts_initrd.c -rw-r--r-- 3.1 KB
do_mounts_md.c -rw-r--r-- 7.9 KB
do_mounts_rd.c -rw-r--r-- 8.1 KB
initramfs.c -rw-r--r-- 12.6 KB
main.c -rw-r--r-- 19.9 KB
noinitramfs.c -rw-r--r-- 1.5 KB
version.c -rw-r--r-- 1.1 KB

back to top