[kernel] r21976 - in dists/sid/linux/debian: . patches patches/bugfix/x86

Ben Hutchings benh at moszumanska.debian.org
Sun Oct 26 02:43:20 UTC 2014


Author: benh
Date: Sun Oct 26 02:43:20 2014
New Revision: 21976

Log:
[x86] drm/i915: Initialise userptr mmu_notifier serial to 1 (Closes: #765590)

Added:
   dists/sid/linux/debian/patches/bugfix/x86/drm-i915-initialise-userptr-mmu_notifier-serial-to-1.patch
Modified:
   dists/sid/linux/debian/changelog
   dists/sid/linux/debian/patches/series

Modified: dists/sid/linux/debian/changelog
==============================================================================
--- dists/sid/linux/debian/changelog	Sun Oct 26 02:26:08 2014	(r21975)
+++ dists/sid/linux/debian/changelog	Sun Oct 26 02:43:20 2014	(r21976)
@@ -8,6 +8,8 @@
   * [x86] r8723au: Backport changes up to Linux 3.17 (Closes: #765685)
   * mmc_block: Increase max_devices and set MMC_BLOCK_MINORS to 256
     (Closes: #765621)
+  * [x86] drm/i915: Initialise userptr mmu_notifier serial to 1
+    (Closes: #765590)
 
   [ Mauricio Faria de Oliveira ]
   * [ppc64el] Disable CONFIG_CMDLINE{,_BOOL} usage for setting consoles

Added: dists/sid/linux/debian/patches/bugfix/x86/drm-i915-initialise-userptr-mmu_notifier-serial-to-1.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux/debian/patches/bugfix/x86/drm-i915-initialise-userptr-mmu_notifier-serial-to-1.patch	Sun Oct 26 02:43:20 2014	(r21976)
@@ -0,0 +1,39 @@
+From: Chris Wilson <chris at chris-wilson.co.uk>
+Date: Fri, 11 Jul 2014 11:28:01 +0100
+Subject: drm/i915: Initialise userptr mmu_notifier serial to 1
+Origin: https://git.kernel.org/linus/6c308fecb4d1f928d52f9586d976f79b37149388
+Bug-Debian: https://bugs.debian.org/765590
+
+During the range invalidate, we walk the list of buffers associated with
+the mmu_notifer and find the ones that overlap the range. An
+optimisation is made to speed up the iteration by assuming the previous
+iter is still valid whilst the tree is unmodified. This exposes a bug
+when a range invalidate is triggered after we have just created the
+mmu_notifier, but before attaching any buffers. In that case, we presume
+we have an unmodified list and start walking from the last iter which is
+NULL. Oops.
+
+The easiest fix is then to initialise the serial of the tree to 1.
+
+Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
+Cc: Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com>
+Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com>
+Testecase: igt/gem_userptr_blts/stress-mm
+Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
+---
+ drivers/gpu/drm/i915/i915_gem_userptr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c
+index 21ea928..b41614d 100644
+--- a/drivers/gpu/drm/i915/i915_gem_userptr.c
++++ b/drivers/gpu/drm/i915/i915_gem_userptr.c
+@@ -150,7 +150,7 @@ i915_mmu_notifier_get(struct drm_device *dev, struct mm_struct *mm)
+ 	mmu->mm = mm;
+ 	mmu->objects = RB_ROOT;
+ 	mmu->count = 0;
+-	mmu->serial = 0;
++	mmu->serial = 1;
+ 
+ 	/* Protected by mmap_sem (write-lock) */
+ 	ret = __mmu_notifier_register(&mmu->mn, mm);

Modified: dists/sid/linux/debian/patches/series
==============================================================================
--- dists/sid/linux/debian/patches/series	Sun Oct 26 02:26:08 2014	(r21975)
+++ dists/sid/linux/debian/patches/series	Sun Oct 26 02:43:20 2014	(r21976)
@@ -389,3 +389,4 @@
 bugfix/all/vfs-Don-t-exchange-short-filenames-unconditionally.patch
 bugfix/all/qla2xxx-fix-kernel-NULL-pointer-access.patch
 features/all/mmc_block-increase-max_devices.patch
+bugfix/x86/drm-i915-initialise-userptr-mmu_notifier-serial-to-1.patch



More information about the Kernel-svn-changes mailing list