DRM agp_init error path oops
bhelgaas at google.com
Thu Oct 25 11:33:09 PDT 2012
I think there's a latent bug in a DRM error path, at least when used
by i915. In the scenario below, if dev->driver->bus->agp_init()
fails, we call drm_lastclose(). At least in i915_driver_lastclose(),
this dereferences dev->dev_private (at "1" below).
But dev->dev_private isn't initialized until "2", in i915_driver_load().
drm_lastclose # error path when agp_init fails
2) dev->dev_private = (void *)dev_priv
We tripped over this because a different bug caused drm_pci_agp_init()
to fail when it shouldn't have. Details about that bug are here:
That bug has been fixed, but this dev_private initialization ordering
problem is still there, waiting to bite us again on the next machine
where drm_pci_agp_init() fails for some reason.
More information about the dri-devel