[Intel-gfx] [PATCH 2/3] drm/i915: Check for ips_mchdev being NULL
Chris Wilson
chris at chris-wilson.co.uk
Wed Nov 6 08:40:25 UTC 2019
Quoting Niranjan Vishwanathapura (2019-11-06 02:14:45)
> On Wed, Nov 06, 2019 at 12:37:14AM +0000, Chris Wilson wrote:
> >Quoting Niranjana Vishwanathapura (2019-11-06 00:02:04)
> >> Guard against uninitalized (NULL) ips_mchdev before
> >> dereferencing.
> >
> >Because?
>
> I am seeing some exported functions like i915_read_mch_val() that try to
> dereference ips_mchdev via mchdev_get(). I don't know full usage here,
> but probably make these APIs fail safe?
Are you also going to make those functions safe when the module isn't
there? If that module interface is used outside of the registration
period, then the binding with the caller went horribly astray.
-Chris
More information about the Intel-gfx
mailing list