[PATCH v2 1/1] drm/i915: Use drm_dev_unplug()
Chris Wilson
chris at chris-wilson.co.uk
Fri Apr 19 10:25:44 UTC 2019
Quoting Janusz Krzysztofik (2019-04-19 08:21:05)
> From: Janusz Krzysztofik <janusz.krzysztofik at intel.com>
>
> The driver does not currently support unbinding from a device which is
> in use. Since open file descriptors may still be pointing into kernel
> memory where the device structures used to be, entirely correct kernel
> panics protect the driver from being unbound as we should not be
> unbinding it before those dangling pointers have been made safe.
>
> According to the documentation found inside drivers/gpu/drm/drm_drv.c,
> drm_dev_unplug() should be used instead of drm_dev_unregister() in
> order to make a device inaccessible to users as soon as it is unpluged.
> Follow that advice to make those possibly dangling pointers safe,
> protected by DRM layer from a user who is otherwise left pointing into
> possibly reused kernel memory after the driver has been unbound from
> the device.
>
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at intel.com>
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
I was worried we might have to wait until a backmerge with the fixed
drm-next, but dinq itself is correct, so it should all just work out :)
Pushed, thanks.
-Chris
More information about the Intel-gfx-trybot
mailing list