diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-07-06 14:50:20 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-07-06 14:50:20 +0000 |
commit | 5f3d71c2afe1c553b1c388aac3b59523d83e41c7 (patch) | |
tree | 0db4003fdafe846511081333550538d36e0351c1 | |
parent | b7e506b86a1d9691ff26019343ff523bfd30b393 (diff) |
defer access of fb_info pointer in drm_fb_helper_hotplug_event()
Fixes a regression from rev 1.24 which lead to a page fault reported by
Martin Ziemer. ok stsp@
-rw-r--r-- | sys/dev/pci/drm/drm_fb_helper.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/drm_fb_helper.c b/sys/dev/pci/drm/drm_fb_helper.c index 6ddad45c990..13929cc0b08 100644 --- a/sys/dev/pci/drm/drm_fb_helper.c +++ b/sys/dev/pci/drm/drm_fb_helper.c @@ -1958,7 +1958,7 @@ EXPORT_SYMBOL(drm_fb_helper_initial_config); */ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper) { - struct fb_info *fbi = fb_helper->fbdev; + struct fb_info *fbi; int err = 0; if (!drm_fbdev_emulation || !fb_helper) @@ -1985,6 +1985,7 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper) drm_setup_crtcs_fb(fb_helper); mutex_unlock(&fb_helper->lock); + fbi = fb_helper->fbdev; if (fbi->fbops && fbi->fbops->fb_set_par) fbi->fbops->fb_set_par(fbi); else |