• C
    drm/i915: Protect against drm_gem_object not being the first member · c8725226
    Chris Wilson 提交于
    Dave Airlie spotted that we had a potential bug should we ever rearrange
    the drm_i915_gem_object so not the base drm_gem_object was not its first
    member. He noticed that we often convert the return of
    drm_gem_object_lookup() immediately into drm_i915_gem_object and then
    check the result for nullity. This is only valid when the base object is
    the first member and so the superobject has the same address. Play safe
    instead and use the compiler to convert back to the original return
    address for sanity testing.
    Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
    c8725226
intel_overlay.c 40.5 KB