kernel-hacking-2024-linux-s.../drivers/video
Dave Airlie d8636a2717 fbcon: fix race condition between console lock and cursor timer (v1.1)
So we've had a fair few reports of fbcon handover breakage between
efi/vesafb and i915 surface recently, so I dedicated a couple of
days to finding the problem.

Essentially the last thing we saw was the conflicting framebuffer
message and that was all.

So after much tracing with direct netconsole writes (printks
under console_lock not so useful), I think I found the race.

Thread A (driver load)    Thread B (timer thread)
  unbind_con_driver ->              |
  bind_con_driver ->                |
  vc->vc_sw->con_deinit ->          |
  fbcon_deinit ->                   |
  console_lock()                    |
      |                             |
      |                       fbcon_flashcursor timer fires
      |                       console_lock() <- blocked for A
      |
      |
fbcon_del_cursor_timer ->
  del_timer_sync
  (BOOM)

Of course because all of this is under the console lock,
we never see anything, also since we also just unbound the active
console guess what we never see anything.

Hopefully this fixes the problem for anyone seeing vesafb->kms
driver handoff.

v1.1: add comment suggestion from Alan.

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-08-22 14:00:35 +10:00
..
aty fbdev updates for 3.6 2012-08-01 10:45:12 -07:00
backlight Merge branch 'akpm' (Andrew's patch-bomb) 2012-07-30 17:25:34 -07:00
console fbcon: fix race condition between console lock and cursor timer (v1.1) 2012-08-22 14:00:35 +10:00
exynos fbdev updates for 3.6 2012-08-01 10:45:12 -07:00
geode
i810
intelfb
kyro
logo
matrox i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING 2012-05-30 10:55:34 +02:00
mb862xx
mbx drivers/video: use correct __devexit_p annotation 2012-06-09 12:51:11 +00:00
msm
nvidia
omap
omap2 Merge branch 'for-florian' of git://gitorious.org/linux-omap-dss2/linux into fbdev-next 2012-07-25 08:55:46 +00:00
pnx4008
riva
savage Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-07-24 13:34:56 -07:00
sis Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-07-24 13:34:56 -07:00
vermilion
via
68328fb.c
acornfb.c
acornfb.h
amba-clcd.c
amifb.c
arcfb.c video: Fix typo in drivers/video 2012-07-24 12:58:15 +02:00
arkfb.c
asiliantfb.c
atafb.c
atafb.h
atafb_iplan2p2.c
atafb_iplan2p4.c
atafb_iplan2p8.c
atafb_mfb.c
atafb_utils.h
atmel_lcdfb.c video: Fix typo in drivers/video 2012-07-24 12:58:15 +02:00
au1100fb.c
au1100fb.h
au1200fb.c
au1200fb.h
auo_k190x.c
auo_k190x.h
auo_k1900fb.c
auo_k1901fb.c
bf54x-lq043fb.c
bf537-lq035.c
bfin-lq035q1-fb.c
bfin-t350mcqb-fb.c
bfin_adv7393fb.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-07-24 13:34:56 -07:00
bfin_adv7393fb.h
broadsheetfb.c drivers/video: use correct __devexit_p annotation 2012-06-09 12:51:11 +00:00
bt431.h
bt455.h
bw2.c
c2p.h
c2p_core.h
c2p_iplan2.c
c2p_planar.c
carminefb.c
carminefb.h
carminefb_regs.h
cfbcopyarea.c
cfbfillrect.c
cfbimgblt.c
cg3.c
cg6.c
cg14.c
chipsfb.c
cirrusfb.c video: Fix typo in drivers/video 2012-07-24 12:58:15 +02:00
clps711xfb.c
cobalt_lcdfb.c
controlfb.c
controlfb.h
cyber2000fb.c
cyber2000fb.h
da8xx-fb.c da8xx-fb: fix compile issue due to missing include 2012-07-29 16:47:40 +00:00
dnfb.c
edid.h
efifb.c
ep93xx-fb.c
epson1355fb.c fb: epson1355fb: Fix section mismatch 2012-07-24 20:54:35 +00:00
fb-puv3.c
fb_ddc.c
fb_defio.c fb_defio: Push file_update_time() into fb_deferred_io_mkwrite() 2012-07-31 01:02:44 +04:00
fb_draw.h fbdev: Make pixel_to_pat() failure mode more friendly 2012-07-29 12:25:06 +00:00
fb_notify.c
fb_sys_fops.c
fbcmap.c
fbcvt.c
fbmem.c fbdev: add events for early fb event support 2012-05-29 16:22:28 -07:00
fbmon.c
fbsysfs.c fb: handle NULL pointers in framebuffer release 2012-05-29 13:00:03 +00:00
ffb.c
fm2fb.c
fsl-diu-fb.c
g364fb.c
gbefb.c
grvga.c grvga: Fix error handling issues 2012-07-08 14:03:17 +00:00
gxt4500.c
hecubafb.c
hgafb.c
hitfb.c
hpfb.c
i740_reg.h
i740fb.c video: Fix typo in drivers/video 2012-07-24 12:58:15 +02:00
igafb.c
imsttfb.c
imxfb.c
jz4740_fb.c
Kconfig
leo.c
macfb.c
macmodes.c
macmodes.h
Makefile
maxinefb.c
metronomefb.c
modedb.c
mx3fb.c mx3fb: avoid screen flash when panning with fb_set_var 2012-06-27 06:59:51 +00:00
mxsfb.c video: mxsfb: add simple device tree probe 2012-07-03 13:22:37 +08:00
n411.c
neofb.c
nuc900fb.c
nuc900fb.h
offb.c
output.c
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
pxa3xx-gcu.h
pxa168fb.c
pxa168fb.h
pxafb.c
pxafb.h
q40fb.c
s1d13xxxfb.c
s3c-fb.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-07-24 13:34:56 -07:00
s3c2410fb.c
s3c2410fb.h
s3fb.c s3fb: Add Virge/MX (86C260) 2012-07-08 14:03:50 +00:00
sa1100fb.c
sa1100fb.h
sbuslib.c
sbuslib.h
sgivwfb.c
sh7760fb.c
sh_mipi_dsi.c fbdev: sh_mipi_dsi: fix a section mismatch 2012-06-20 10:02:53 +02:00
sh_mobile_hdmi.c
sh_mobile_lcdcfb.c fbdev: sh_mobile_lcdc: Fix vertical panning step 2012-07-29 01:17:07 +00:00
sh_mobile_lcdcfb.h fbdev: sh_mobile_lcdc: Fix pan offset computation in YUV mode 2012-07-19 12:15:26 +02:00
sh_mobile_meram.c sh_mobile_meram: Add direct MERAM allocation API 2012-07-19 02:05:22 +02:00
skeletonfb.c
sm501fb.c
smscufx.c fbdev updates for 3.6 2012-08-01 10:45:12 -07:00
sstfb.c
sticore.h
stifb.c
sunxvr500.c video: Fix typo in drivers/video 2012-07-24 12:58:15 +02:00
sunxvr1000.c
sunxvr2500.c
svgalib.c
syscopyarea.c
sysfillrect.c
sysimgblt.c
tcx.c
tdfxfb.c
tgafb.c
tmiofb.c
tridentfb.c
udlfb.c fbdev updates for 3.5 2012-06-01 16:57:51 -07:00
uvesafb.c
valkyriefb.c
valkyriefb.h
vesafb.c
vfb.c
vga16fb.c
vgastate.c
vt8500lcdfb.c
vt8500lcdfb.h
vt8623fb.c
w100fb.c video: w100fb: Reduce sleep mode battery discharge 2012-07-08 14:03:02 +00:00
w100fb.h
wm8505fb.c
wm8505fb_regs.h
wmt_ge_rops.c
wmt_ge_rops.h
xen-fbfront.c
xilinxfb.c