linux_dsm_epyc7002/drivers/video/console
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
..
bitblit.c fbcon: uninline four foo_update_attr() functions 2010-08-11 08:59:09 -07:00
dummycon.c
fbcon_ccw.c fbcon: uninline four foo_update_attr() functions 2010-08-11 08:59:09 -07:00
fbcon_cw.c fbcon: uninline four foo_update_attr() functions 2010-08-11 08:59:09 -07:00
fbcon_rotate.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
fbcon_rotate.h fbcon: fix rotate upside down crash 2009-08-07 10:39:55 -07:00
fbcon_ud.c fbcon: uninline four foo_update_attr() functions 2010-08-11 08:59:09 -07:00
fbcon.c fbcon: fix race condition between console lock and cursor timer (v1.1) 2012-08-22 14:00:35 +10:00
fbcon.h fb: add hooks to handle KDB enter/exit 2010-08-05 09:22:31 -05:00
font_6x11.c
font_7x14.c
font_8x8.c
font_8x16.c
font_10x18.c
font_acorn_8x8.c
font_mini_4x6.c Fix common misspellings 2011-03-31 11:26:23 -03:00
font_pearl_8x8.c
font_sun8x16.c
font_sun12x22.c
fonts.c
Kconfig video/console: automatically select a font 2012-06-09 12:51:11 +00:00
Makefile sparc: Kill PROM console driver. 2009-09-15 17:04:38 -07:00
mdacon.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
newport_con.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
softcursor.c
sticon.c Revert "vt: fix background color on line feed" 2008-10-14 12:12:02 -07:00
sticore.c parisc: move definition of PAGE0 to asm/page.h 2012-05-10 15:12:08 -07:00
tileblit.c fbcon: Bugfix soft cursor detection in Tile Blitting 2011-03-22 16:41:08 +09:00
vgacon.c locking, video: Annotate vga console lock as raw 2011-09-13 11:12:04 +02:00