Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6939a5ac authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Prevent module unload to avoid random memory corruption



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: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@kernel.org
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent 6b0cd00b
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -2231,6 +2231,9 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
	dev_priv->mchdev_lock = &mchdev_lock;
	dev_priv->mchdev_lock = &mchdev_lock;
	spin_unlock(&mchdev_lock);
	spin_unlock(&mchdev_lock);


	/* XXX Prevent module unload due to memory corruption bugs. */
	__module_get(THIS_MODULE);

	return 0;
	return 0;


out_workqueue_free:
out_workqueue_free: