linux/drivers/video/fbdev
Daniel Vetter fffb0b52d5 fbcon: set_con2fb_map needs to set con2fb_map!
I got really badly confused in d443d93864 ("fbcon: move more common
code into fb_open()") because we set the con2fb_map before the failure
points, which didn't look good.

But in trying to fix that I moved the assignment into the wrong path -
we need to do it for _all_ vc we take over, not just the first one
(which additionally requires the call to con2fb_acquire_newinfo).

I've figured this out because of a KASAN bug report, where the
fbcon_registered_fb and fbcon_display arrays went out of sync in
fbcon_mode_deleted() because the con2fb_map pointed at the old
fb_info, but the modes and everything was updated for the new one.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Helge Deller <deller@gmx.de>
Tested-by: Xingyuan Mo <hdthky0@gmail.com>
Fixes: d443d93864 ("fbcon: move more common code into fb_open()")
Reported-by: Xingyuan Mo <hdthky0@gmail.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Xingyuan Mo <hdthky0@gmail.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Helge Deller <deller@gmx.de>
Cc: <stable@vger.kernel.org> # v5.19+
2023-04-13 20:10:11 +02:00
..
aty fbdev: radeon: Use backlight helper 2023-01-09 09:57:50 +01:00
core fbcon: set_con2fb_map needs to set con2fb_map! 2023-04-13 20:10:11 +02:00
geode fbdev: lxfb: Fix potential divide by zero 2023-03-16 16:18:17 +01:00
i810 fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
intelfb fbdev: intelfb: Fix potential divide by zero 2023-03-16 16:18:16 +01:00
kyro fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
matrox fbdev: matroxfb: G200eW: Increase max memory from 1 MB to 16 MB 2023-01-02 15:46:41 +01:00
mb862xx fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
mmp video: fbdev: mmp: replace usage of found with dedicated list iterator variable 2022-04-12 22:06:10 +02:00
nvidia fbdev: nvidia: Fix potential divide by zero 2023-03-16 16:18:16 +01:00
omap fbdev: omapfb: remove omap1 osk driver 2023-03-14 18:49:47 +01:00
omap2 fbdev: Use of_property_present() for testing DT property presence 2023-03-16 16:18:17 +01:00
riva fbdev: riva: Use backlight helper 2023-01-09 09:57:51 +01:00
savage fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
sis Linux 6.1-rc6 2022-11-24 11:05:43 +10:00
vermilion fbdev: vermilion: decrease reference count in error path 2022-12-14 20:01:50 +01:00
via fbdev: via: Fix error in via_core_init() 2022-12-14 20:01:50 +01:00
68328fb.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
acornfb.c video: fbdev: acornfb: remove free_unused_pages() 2021-02-24 13:38:31 -08:00
acornfb.h
amba-clcd.c fbdev: Use of_property_present() for testing DT property presence 2023-03-16 16:18:17 +01:00
amifb.c video: fbdev: amiga: Simplify amifb_pan_display() 2022-07-18 07:54:17 +02:00
arcfb.c video: fbdev: arcfb: remove redundant initialization of variable err 2021-07-21 13:09:21 +02:00
arkfb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
asiliantfb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
atafb_iplan2p2.c
atafb_iplan2p4.c
atafb_iplan2p8.c
atafb_mfb.c
atafb_utils.h
atafb.c video: fbdev: atari: Remove backward bug-compatibility 2022-07-18 07:56:18 +02:00
atafb.h
atmel_lcdfb.c fbdev: atmel_lcdfb: Rework backlight status updates 2023-01-09 21:33:14 +01:00
au1100fb.c video: fbdev: au1100fb: Drop unnecessary NULL ptr check 2022-06-20 20:19:50 +02:00
au1100fb.h video: fbdev: au1100fb: Spelling s/palette/palette/ 2022-02-16 10:54:42 +01:00
au1200fb.c fbdev: au1200fb: Fix potential divide by zero 2023-03-16 16:18:17 +01:00
au1200fb.h
broadsheetfb.c fbdev: Use pageref offset for deferred-I/O writeback 2022-05-03 16:04:22 +02:00
bt431.h
bt455.h
bw2.c fbdev: Use of_property_present() for testing DT property presence 2023-03-16 16:18:17 +01:00
c2p_core.h fbdev: c2p: Use BUILD_BUG() instead of custom solution 2020-03-09 11:12:19 +01:00
c2p_iplan2.c
c2p_planar.c
c2p.h
carminefb_regs.h
carminefb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
carminefb.h
cg3.c fbdev: Use of_property_present() for testing DT property presence 2023-03-16 16:18:17 +01:00
cg6.c video: fbdev: sparc drivers: fix kernel-doc warnings for blank_mode 2020-12-08 18:34:08 +01:00
cg14.c fbdev: cg14fb: use resource_size 2020-01-15 17:31:50 +01:00
chipsfb.c fbdev: chipsfb: Fix error codes in chipsfb_pci_init() 2023-02-28 09:20:04 +01:00
cirrusfb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
clps711x-fb.c fbdev: clps711x-fb: Use devm_platform_get_and_ioremap_resource() 2023-03-14 18:49:39 +01:00
cobalt_lcdfb.c video: constify fb ops across all drivers 2019-12-05 10:57:53 +02:00
controlfb.c fbdev: controlfb: fix spelling mistake "paramaters"->"parameters" 2022-12-14 20:01:50 +01:00
controlfb.h
cyber2000fb.c Linux 6.1-rc6 2022-11-24 11:05:43 +10:00
cyber2000fb.h
da8xx-fb.c fbdev: da8xx-fb: add missing regulator_disable() in fb_probe 2022-12-14 20:01:50 +01:00
dnfb.c video: fbdev: Make *fb_setup() and *fb_init() static 2022-07-18 07:54:20 +02:00
edid.h
efifb.c fbdev/efifb: Do not use struct fb_info.apertures 2023-01-13 12:54:29 +01:00
ep93xx-fb.c fbdev: ep93xx-fb: Add missing clk_disable_unprepare in ep93xxfb_probe() 2022-12-14 20:01:50 +01:00
ffb.c fbdev: Move fbdev drivers from strlcpy to strscpy 2022-08-24 22:06:15 +02:00
fm2fb.c video: fbdev: Make *fb_setup() and *fb_init() static 2022-07-18 07:54:20 +02:00
fsl-diu-fb.c video: fbdev: fsl-diu-fb: remove unneeded variable 'res' 2020-10-17 08:23:14 +02:00
g364fb.c fbdev/g364fb: Fix build failure 2020-02-19 10:58:22 -08:00
gbefb.c fbdev: gbefb: Convert sysfs snprintf to sysfs_emit 2022-10-18 10:28:41 +02:00
goldfishfb.c video: fbdev: goldfishfb: Fix defined but not used warning 2020-12-08 18:34:50 +01:00
grvga.c video: fbdev: Replace HTTP links with HTTPS ones 2020-07-20 11:47:29 +02:00
gxt4500.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
hecubafb.c fbdev: Rename pagelist to pagereflist for deferred I/O 2022-05-03 16:04:22 +02:00
hgafb.c video: hgafb: correctly handle card detect failure during probe 2021-05-21 15:04:05 +02:00
hitfb.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
hpfb.c video: fbdev: Make *fb_setup() and *fb_init() static 2022-07-18 07:54:20 +02:00
hyperv_fb.c drm next for 6.3-rc1 2023-02-22 18:28:03 -08:00
i740_reg.h
i740fb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
imsttfb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
imxfb.c fbdev: imxfb: Remove redundant dev_err() call 2022-10-08 15:20:08 +02:00
Kconfig ARM: unused boardfile removal for 6.3 2023-02-20 15:28:57 -08:00
leo.c video: fbdev: sparc drivers: fix kernel-doc warnings for blank_mode 2020-12-08 18:34:08 +01:00
macfb.c video: fbdev: Replace HTTP links with HTTPS ones 2020-07-20 11:47:29 +02:00
macmodes.c
macmodes.h
Makefile fbdev: remove w100fb driver 2023-02-01 17:23:38 +01:00
maxinefb.c video: constify fb ops across all drivers 2019-12-05 10:57:53 +02:00
metronomefb.c fbdev: Use pageref offset for deferred-I/O writeback 2022-05-03 16:04:22 +02:00
mx3fb.c fbdev: mx3fb: Use backlight helper 2023-01-09 09:57:50 +01:00
n411.c
neofb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
ocfb.c video: fbdev: ocfb: add const to of_device_id 2022-01-29 22:24:25 +01:00
offb.c fbdev: Use of_property_read_bool() for boolean properties 2023-03-14 18:49:39 +01:00
p9100.c video: fbdev: sparc drivers: fix kernel-doc warnings for blank_mode 2020-12-08 18:34:08 +01:00
platinumfb.c video: fbdev: aty/matrox/...: Prepare cleanup of powerpc's asm/prom.h 2022-04-04 08:55:23 +02:00
platinumfb.h
pm2fb.c fbdev: pm2fb: fix missing pci_disable_device() 2022-12-14 20:01:50 +01:00
pm3fb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
pmag-aa-fb.c drm pull for 5.6-rc1 2020-01-30 08:04:01 -08:00
pmag-ba-fb.c drm pull for 5.6-rc1 2020-01-30 08:04:01 -08:00
pmagb-b-fb.c drm pull for 5.6-rc1 2020-01-30 08:04:01 -08:00
ps3fb.c powerpc/ps3: make system bus's remove and shutdown callbacks return void 2020-12-04 01:01:22 +11:00
pvr2fb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
pxa3xx-gcu.c fbdev: pxa3xx-gcu: Use devm_platform_get_and_ioremap_resource() 2023-03-14 18:49:39 +01:00
pxa3xx-gcu.h
pxa3xx-regs.h ARM: pxa: move regs-lcd.h into driver 2022-04-19 16:29:03 +02:00
pxa168fb.c fbdev: Move fbdev drivers from strlcpy to strscpy 2022-08-24 22:06:15 +02:00
pxa168fb.h
pxafb.c fbdev: pxafb: Remove unnecessary print function dev_err() 2022-12-14 20:01:50 +01:00
pxafb.h
q40fb.c video: fbdev: Make *fb_setup() and *fb_init() static 2022-07-18 07:54:20 +02:00
s1d13xxxfb.c video: fbdev: s1d13xxxfb: Fix kernel-doc and set but not used warnings 2020-11-29 22:51:07 +01:00
s3c-fb.c drm for 5.18-rc1 2022-03-24 16:19:43 -07:00
s3fb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
sa1100fb.c ARM: sa1100: remove unused board files 2023-01-12 10:53:12 +01:00
sa1100fb.h ARM/fbdev: sa11x0: Switch to use GPIO descriptors 2020-04-17 15:50:11 +02:00
sbuslib.c fbdev: sbuslib: remove compat_alloc_user_space usage 2020-09-25 16:34:50 +02:00
sbuslib.h
sh7760fb.c drm pull for 5.6-rc1 2020-01-30 08:04:01 -08:00
sh_mobile_lcdcfb.c fbdev: sh_mobile_lcdcfb: use sysfs_emit() to instead of scnprintf() 2022-12-14 20:01:51 +01:00
sh_mobile_lcdcfb.h
simplefb.c fbdev/simplefb: Do not use struct fb_info.apertures 2023-01-13 12:54:31 +01:00
skeletonfb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
sm501fb.c fbdev: Use of_property_read_bool() for boolean properties 2023-03-14 18:49:39 +01:00
sm712.h
sm712fb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
smscufx.c fbdev: smscufx: fix error handling code in ufx_usb_probe 2022-12-14 20:01:50 +01:00
ssd1307fb.c fbdev: ssd1307fb: Drop duplicate NULL checks for PWM APIs 2022-12-14 20:01:48 +01:00
sstfb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
sticore.h parisc/stifb: Keep track of hardware path of graphics card 2022-06-04 15:47:03 +02:00
stifb.c fbdev: stifb: Provide valid pixelclock and add fb_check_var() checks 2023-03-16 16:18:16 +01:00
sunxvr500.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
sunxvr1000.c fbdev: Move fbdev drivers from strlcpy to strscpy 2022-08-24 22:06:15 +02:00
sunxvr2500.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
tcx.c fbdev: Use of_property_read_bool() for boolean properties 2023-03-14 18:49:39 +01:00
tdfxfb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
tgafb.c fbdev: tgafb: Fix potential divide by zero 2023-03-14 18:49:39 +01:00
tridentfb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
udlfb.c fbdev: udlfb: Remove redundant initialization to variable identical 2022-10-08 15:20:08 +02:00
uvesafb.c fbdev: uvesafb: use sysfs_emit() to instead of scnprintf() 2022-12-14 20:01:51 +01:00
valkyriefb.c video: fbdev: Make *fb_setup() and *fb_init() static 2022-07-18 07:54:20 +02:00
valkyriefb.h
vesafb.c fbdev/vesafb: Do not use struct fb_info.apertures 2023-01-13 12:54:33 +01:00
vfb.c video: constify fb ops across all drivers 2019-12-05 10:57:53 +02:00
vga16fb.c fbdev/vga16fb: Do not use struct fb_info.apertures 2023-01-13 12:54:34 +01:00
vt8500lcdfb.c video: vt8500lcdfb: fix fallthrough warning 2020-04-17 15:50:08 +02:00
vt8500lcdfb.h
vt8623fb.c fbdev: Add support for the nomodeset kernel parameter 2022-11-16 13:26:25 +01:00
wm8505fb_regs.h
wm8505fb.c fbdev: wm8505fb: Use devm_platform_ioremap_resource() 2023-03-14 18:49:39 +01:00
wmt_ge_rops.c video: fbdev: wmt_ge_rops: Fix function not declared warnings 2020-12-08 18:34:36 +01:00
wmt_ge_rops.h
xen-fbfront.c xen: branch for v6.2-rc4 2023-01-12 17:02:20 -06:00
xilinxfb.c fbdev: xilinxfb: Use devm_platform_get_and_ioremap_resource() 2023-03-14 18:49:40 +01:00