]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/i915: Prevent module unload to avoid random memory corruption
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 8 Oct 2010 12:40:27 +0000 (13:40 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 29 Oct 2010 04:51:29 +0000 (21:51 -0700)
commit 6939a5aca7cfada279a24c307e772f33104fca20 upstream.

The i915 driver has quite a few module unload bugs, the known ones at
least have fixes that are targeting 2.6.37. However, in order to
maintain a stable kernel, we should prevent this known random memory
corruption following driver unload. This should have very low impact on
normal users who are unlikely to need to unload the i915 driver.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/i915/i915_dma.c

index ce8ff0e551528be0a21b048b77be45518c3416c2..f9a1437919daaad7b62d06967b9f314d0bbbf979 100644 (file)
@@ -2222,6 +2222,9 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
        dev_priv->mchdev_lock = &mchdev_lock;
        spin_unlock(&mchdev_lock);
 
+       /* XXX Prevent module unload due to memory corruption bugs. */
+       __module_get(THIS_MODULE);
+
        return 0;
 
 out_workqueue_free: