[Intel-gfx] [PATCH] drm/i915: Unregister the i915_gem_inactive_shrink on module load failure

Chris Wilson chris at chris-wilson.co.uk
Sun Jul 10 18:32:42 CEST 2011


Otherwise, the core vm will call into an non-existent code page. Oops.

Reported-by: Lin Ming <ming.m.lin at intel.com>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_dma.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 1315a88..634309d 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -2076,6 +2076,9 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
 	return 0;
 
 out_gem_unload:
+	if (dev_priv->mm.inactive_shrinker.shrink)
+		unregister_shrinker(&dev_priv->mm.inactive_shrinker);
+
 	if (dev->pdev->msi_enabled)
 		pci_disable_msi(dev->pdev);
 
-- 
1.7.5.4




More information about the Intel-gfx mailing list