]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/i915: unload: don't leak error state
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 20 Aug 2010 19:25:11 +0000 (21:25 +0200)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 8 Sep 2010 09:13:25 +0000 (10:13 +0100)
With kms, interrupts now get disabled in the modesetting cleanup. So
free the error state afterwards, it currently gets allocated in
the interrupt handler.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_dma.c

index 45236e7166692c9d24071973a9f81353121242a5..970c338323a898ad45ce12586ba8e4eed136c383 100644 (file)
@@ -2250,8 +2250,6 @@ int i915_driver_unload(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
 
-       i915_destroy_error_state(dev);
-
        spin_lock(&mchdev_lock);
        i915_mch_dev = NULL;
        spin_unlock(&mchdev_lock);
@@ -2280,8 +2278,10 @@ int i915_driver_unload(struct drm_device *dev)
                vga_client_register(dev->pdev, NULL, NULL, NULL);
        }
 
+       /* Free error state after interrupts are fully disabled. */
        del_timer_sync(&dev_priv->hangcheck_timer);
        cancel_work_sync(&dev_priv->error_work);
+       i915_destroy_error_state(dev);
 
        if (dev->pdev->msi_enabled)
                pci_disable_msi(dev->pdev);