diff options
author | Chris Wilson | 2018-07-16 10:03:31 +0200 |
---|---|---|
committer | Chris Wilson | 2018-07-16 12:25:28 +0200 |
commit | 159b69bc0dcdb88ea5126a8f98e4caa31789326b (patch) | |
tree | ad4363b03052981f73d35df6b89e51bd1559d229 /drivers/gpu/drm/i915/i915_drv.c | |
parent | drm/i915/selftests: Downgrade igt_timeout message (diff) | |
download | kernel-qcow2-linux-159b69bc0dcdb88ea5126a8f98e4caa31789326b.tar.gz kernel-qcow2-linux-159b69bc0dcdb88ea5126a8f98e4caa31789326b.tar.xz kernel-qcow2-linux-159b69bc0dcdb88ea5126a8f98e4caa31789326b.zip |
drm/i915: Remove pci private pointer after destroying the device private
On an aborted module load, we unwind and free our device private - but
we left a dangling pointer to our privates inside the pci_device. After
the attempted aborted unload, we may still get a call to i915_pci_remove()
when the module is removed, potentially chasing stale data.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180716080332.32283-5-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index cfa7583cf408..337b1aad5212 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1424,6 +1424,7 @@ out_fini: drm_dev_fini(&dev_priv->drm); out_free: kfree(dev_priv); + pci_set_drvdata(pdev, NULL); return ret; } |