linux/drivers/video/fbdev
Mikulas Patocka 5b789da8a7 framebuffer: fix screen corruption when copying
The function bitcpy_rev has a bug that may result in screen corruption.
The bug happens under these conditions:
* the end of the destination area of a copy operation is aligned on a long
  word boundary
* the end of the source area is not aligned on a long word boundary
* we are copying more than one long word

In this case, the variable shift is non-zero and the variable first is
zero. The statements FB_WRITEL(comp(d0, FB_READL(dst), first), dst) reads
the last long word of the destination and writes it back unchanged
(because first is zero). Correctly, we should write the variable d0 to the
last word of the destination in this case.

This patch fixes the bug by introducing and extra test if first is zero.

The patch also removes the references to fb_memmove in the code that is
commented out because fb_memmove was removed from framebuffer subsystem.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-09-30 13:39:50 +03:00
..
aty video: fbdev: aty: use c99 initializers in structures 2014-08-26 15:52:39 +03:00
core framebuffer: fix screen corruption when copying 2014-09-30 13:39:50 +03:00
exynos backlight: Remove trivial get_brightness implementations 2014-06-23 13:24:22 +01:00
geode
i810
intelfb video: fbdev: intelfb: delete double assignment 2014-08-26 15:53:34 +03:00
kyro
matrox video: fbdev: matrox: use c99 initializers in structures 2014-08-26 15:52:38 +03:00
mb862xx
mbx video/mbx: indent some if statements 2014-07-01 13:32:30 +03:00
mmp video: mmpfb: cleanup some static checker warnings in probe() 2014-04-30 13:57:29 +03:00
msm msm: msm_fb: Move to using managed resources of kzalloc 2014-08-26 15:53:33 +03:00
nvidia backlight: Remove trivial get_brightness implementations 2014-06-23 13:24:22 +01:00
omap video: omap: delete support for early fbmem allocation 2014-05-16 11:56:12 +03:00
omap2 arm, fbdev, omap2, LLVMLinux: Remove nested function from omapfb 2014-09-30 13:11:53 +03:00
riva video: fbdev: riva: delete double assignment 2014-08-26 15:53:34 +03:00
savage
sis video: fbdev: sis: sis_main.c: Cleaning up missing null-terminate in conjunction with strncpy 2014-09-30 13:00:01 +03:00
vermilion video: vermilion: remove unnecessary break after goto 2014-08-26 15:53:32 +03:00
via
68328fb.c video: 68328fb: remove check for CONFIG_FB_68328_INVERT 2014-06-24 10:55:13 +03:00
acornfb.c
acornfb.h
amba-clcd-versatile.c video: move Versatile CLCD helpers 2014-06-27 10:15:22 +02:00
amba-clcd.c video: ARM CLCD: Fix DT-related build problems 2014-08-04 09:31:35 +03:00
amifb.c
arcfb.c
arkfb.c
asiliantfb.c
atafb_iplan2p2.c
atafb_iplan2p4.c
atafb_iplan2p8.c
atafb_mfb.c
atafb_utils.h
atafb.c m68k/atari - atafb: convert allocation of fb ram to new interface 2014-05-26 22:41:24 +02:00
atafb.h
atmel_lcdfb.c fbdev changes for 3.17 2014-08-08 18:09:33 -07:00
au1100fb.c MIPS: Alchemy: au1100fb: use clk framework 2014-07-30 14:10:39 +02:00
au1100fb.h MIPS: Alchemy: au1100fb: use clk framework 2014-07-30 14:10:39 +02:00
au1200fb.c video: fbdev: au1200fb: delete double assignment 2014-08-26 15:53:35 +03:00
au1200fb.h
auo_k190x.c
auo_k190x.h
auo_k1900fb.c
auo_k1901fb.c
bf54x-lq043fb.c video: delete unneeded call to platform_get_drvdata 2014-05-19 16:03:57 +03:00
bf537-lq035.c
bfin_adv7393fb.c fb: adv7393: add missing semicolon 2014-07-01 13:18:38 +03:00
bfin_adv7393fb.h
bfin-lq035q1-fb.c
bfin-t350mcqb-fb.c
broadsheetfb.c
bt431.h
bt455.h
bw2.c
c2p_core.h
c2p_iplan2.c
c2p_planar.c
c2p.h
carminefb_regs.h
carminefb.c
carminefb.h
cg3.c
cg6.c
cg14.c
chipsfb.c
cirrusfb.c
clps711x-fb.c video: clps711x: Fix sparse warnings 2014-07-04 11:04:45 +03:00
clps711xfb.c
cobalt_lcdfb.c
controlfb.c video: fbdev: controlfb.c: use container_of to resolve fb_info_control from fb_info 2014-09-30 13:06:00 +03:00
controlfb.h
cyber2000fb.c video: fbdev: cyber2000fb.c: use container_of to resolve cfb_info from fb_info 2014-09-30 13:06:01 +03:00
cyber2000fb.h
da8xx-fb.c fbdev: da8xx-fb: Use dma_zalloc_coherent 2014-07-01 13:32:31 +03:00
dnfb.c
edid.h
efifb.c x86, ia64: Move EFI_FB vga_default_device() initialization to pci_vga_fixup() 2014-07-10 16:48:48 -06:00
ep93xx-fb.c
fb-puv3.c drivers/video/fbdev/fb-puv3.c: Add header files for function unifb_mmap 2014-05-23 13:51:10 +03:00
ffb.c
fm2fb.c
fsl-diu-fb.c
g364fb.c
gbefb.c video: fbdev: Fix format string mismatch in gbefb.c 2014-04-30 11:24:40 +03:00
goldfishfb.c
grvga.c video: fbdev: grvga.c: Fix for possible null pointer dereference 2014-05-23 13:47:31 +03:00
gxt4500.c
hecubafb.c
hgafb.c
hitfb.c
hpfb.c
hyperv_fb.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
i740_reg.h
i740fb.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
igafb.c
imsttfb.c
imxfb.c
jz4740_fb.c
Kconfig video: mx3fb: always enable BACKLIGHT_LCD_SUPPORT 2014-09-09 13:56:05 +03:00
leo.c
macfb.c
macmodes.c
macmodes.h
Makefile fbdev changes for 3.17 2014-08-08 18:09:33 -07:00
maxinefb.c
metronomefb.c
mx3fb.c video: mx3fb: Update comment for dmaengine_prep_slave_sg() API 2014-08-26 15:53:33 +03:00
mxsfb.c
n411.c
neofb.c
nuc900fb.c
nuc900fb.h
ocfb.c
offb.c Revert "offb: Add palette hack for little endian" 2014-06-16 19:45:45 +10:00
p9100.c
platinumfb.c
platinumfb.h
pm2fb.c
pm3fb.c
pmag-aa-fb.c
pmag-ba-fb.c
pmagb-b-fb.c
ps3fb.c
pvr2fb.c
pxa3xx-gcu.c video: pxa3xx-gcu: use devm_ioremap_resource() 2014-04-30 14:02:15 +03:00
pxa3xx-gcu.h
pxa168fb.c
pxa168fb.h
pxafb.c video: fbdev: pxafb.c: use container_of to resolve pxafb_info/layer from fb_info 2014-09-30 13:06:01 +03:00
pxafb.h
q40fb.c
s1d13xxxfb.c
s3c2410fb.c This finally applies the stricter sysfs perms checking we pulled out 2014-08-10 21:31:58 -07:00
s3c2410fb.h
s3c-fb.c video: fbdev: s3c-fb: remove s5pc100 related fimd and fb codes 2014-07-13 07:35:15 +09:00
s3fb.c video: fbdev: s3fb.c: Fix for possible null pointer dereference 2014-05-23 13:47:31 +03:00
sa1100fb.c video: fbdev: sa1100fb.c: use container_of to resolve sa1100fb_info from fb_info 2014-09-30 13:06:00 +03:00
sa1100fb.h
sbuslib.c
sbuslib.h
sh7760fb.c
sh_mipi_dsi.c
sh_mobile_hdmi.c
sh_mobile_lcdcfb.c
sh_mobile_lcdcfb.h
sh_mobile_meram.c
simplefb.c
skeletonfb.c
sm501fb.c drivers/video/fbdev/sm501fb.c: avoid world-writable sysfs files. 2014-05-14 10:53:54 +09:30
smscufx.c
ssd1307fb.c
sstfb.c
sticore.h
stifb.c video: fbdev: stifb.c: use container_of to resolve stifb_info from fb_info 2014-09-30 13:06:00 +03:00
sunxvr500.c
sunxvr1000.c
sunxvr2500.c
tcx.c
tdfxfb.c
tgafb.c
tmiofb.c
tridentfb.c
udlfb.c video: fbdev: use %*ph specifier to dump small buffers 2014-09-09 14:03:34 +03:00
uvesafb.c
valkyriefb.c video: fbdev: valkyriefb.c: use container_of to resolve fb_info_valkyrie from fb_info 2014-09-30 13:06:01 +03:00
valkyriefb.h
vesafb.c
vfb.c
vga16fb.c
vt8500lcdfb.c video: vt8500lcdfb: Remove kfree call since devm_kzalloc() is used 2014-06-26 14:40:07 +03:00
vt8500lcdfb.h
vt8623fb.c
w100fb.c
w100fb.h
wm8505fb_regs.h
wm8505fb.c video: fbdev: Fix format string mismatch in wm8505fb.c 2014-04-30 11:24:40 +03:00
wmt_ge_rops.c
wmt_ge_rops.h
xen-fbfront.c
xilinxfb.c