Skip to content

Commit

Permalink
drm/i915: Prevent module unload to avoid random memory corruption
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Cc: [email protected]
Signed-off-by: Chris Wilson <[email protected]>
  • Loading branch information
ickle committed Oct 8, 2010
1 parent 6b0cd00 commit 6939a5a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
@@ -2231,6 +2231,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:

0 comments on commit 6939a5a

Please sign in to comment.