Skip to content

Commit d447ebf

Browse files
thierryredingbzolnier
authored andcommitted
fbcon: Initialize ops->info early
During console takeover, which happens for all DRM/KMS setups using the fbdev helpers, fbcon_startup() is called before fbcon_init() and as a result con2fb_acquire_newinfo() will not be called (info->fbcon_par was set to non-NULL in fbcon_startup()) to assign ops->info. This causes the cursor_timer_handler() to unreference a NULL pointer. Avoid this by unconditionally assigning ops->info during fbcon_startup() so that it will be available early, but keep the additional assignment in con2fb_acquire_newinfo() to support console remapping at runtime. Signed-off-by: Thierry Reding <treding@nvidia.com> Cc: Kees Cook <keescook@chromium.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
1 parent 6c78935 commit d447ebf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/video/fbdev/core/fbcon.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,7 @@ static const char *fbcon_startup(void)
962962
ops->graphics = 1;
963963
ops->cur_rotate = -1;
964964
ops->cur_blink_jiffies = HZ / 5;
965+
ops->info = info;
965966
info->fbcon_par = ops;
966967
if (initial_rotation != -1)
967968
p->con_rotate = initial_rotation;

0 commit comments

Comments
 (0)