Patch reverted upstream.
Signed-off-by: Sasha Levin <sashal@kernel.org>
+++ /dev/null
-From 77fbf1f2ce3d14f2dcd6bbf3dbbe3716f062685f Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 8 Jul 2019 15:03:27 +0100
-Subject: drm/i915/userptr: Acquire the page lock around set_page_dirty()
-
-From: Chris Wilson <chris@chris-wilson.co.uk>
-
-[ Upstream commit cb6d7c7dc7ff8cace666ddec66334117a6068ce2 ]
-
-set_page_dirty says:
-
- For pages with a mapping this should be done under the page lock
- for the benefit of asynchronous memory errors who prefer a
- consistent dirty state. This rule can be broken in some special
- cases, but should be better not to.
-
-Under those rules, it is only safe for us to use the plain set_page_dirty
-calls for shmemfs/anonymous memory. Userptr may be used with real
-mappings and so needs to use the locked version (set_page_dirty_lock).
-
-Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203317
-Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl")
-References: 6dcc693bc57f ("ext4: warn when page is dirtied without buffers")
-Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-Cc: stable@vger.kernel.org
-Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-Link: https://patchwork.freedesktop.org/patch/msgid/20190708140327.26825-1-chris@chris-wilson.co.uk
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/gpu/drm/i915/i915_gem_userptr.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c
-index 05ae8c4a8a1b6..9760b67dab28b 100644
---- a/drivers/gpu/drm/i915/i915_gem_userptr.c
-+++ b/drivers/gpu/drm/i915/i915_gem_userptr.c
-@@ -691,7 +691,15 @@ i915_gem_userptr_put_pages(struct drm_i915_gem_object *obj,
-
- for_each_sgt_page(page, sgt_iter, pages) {
- if (obj->mm.dirty)
-- set_page_dirty(page);
-+ /*
-+ * As this may not be anonymous memory (e.g. shmem)
-+ * but exist on a real mapping, we have to lock
-+ * the page in order to dirty it -- holding
-+ * the page reference is not sufficient to
-+ * prevent the inode from being truncated.
-+ * Play safe and take the lock.
-+ */
-+ set_page_dirty_lock(page);
-
- mark_page_accessed(page);
- put_page(page);
---
-2.20.1
-
perf-tools-fix-segfault-in-cpu_cache_level__read.patch
perf-stat-fix-a-segmentation-fault-when-using-repeat.patch
perf-stat-reset-previous-counts-on-repeat-with-inter.patch
-drm-i915-userptr-acquire-the-page-lock-around-set_pa.patch
vfs-fix-eoverflow-testing-in-put_compat_statfs64.patch
coresight-etm4x-use-explicit-barriers-on-enable-disable.patch
cfg80211-add-and-use-strongly-typed-element-iteration-macros.patch
+++ /dev/null
-From 7d10a59723931ebad8f3e0bd819d72505d9fd7fd Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 8 Jul 2019 15:03:27 +0100
-Subject: drm/i915/userptr: Acquire the page lock around set_page_dirty()
-
-From: Chris Wilson <chris@chris-wilson.co.uk>
-
-[ Upstream commit cb6d7c7dc7ff8cace666ddec66334117a6068ce2 ]
-
-set_page_dirty says:
-
- For pages with a mapping this should be done under the page lock
- for the benefit of asynchronous memory errors who prefer a
- consistent dirty state. This rule can be broken in some special
- cases, but should be better not to.
-
-Under those rules, it is only safe for us to use the plain set_page_dirty
-calls for shmemfs/anonymous memory. Userptr may be used with real
-mappings and so needs to use the locked version (set_page_dirty_lock).
-
-Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203317
-Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl")
-References: 6dcc693bc57f ("ext4: warn when page is dirtied without buffers")
-Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-Cc: stable@vger.kernel.org
-Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-Link: https://patchwork.freedesktop.org/patch/msgid/20190708140327.26825-1-chris@chris-wilson.co.uk
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/gpu/drm/i915/i915_gem_userptr.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c
-index 2c9b284036d10..e13ea2ecd669c 100644
---- a/drivers/gpu/drm/i915/i915_gem_userptr.c
-+++ b/drivers/gpu/drm/i915/i915_gem_userptr.c
-@@ -692,7 +692,15 @@ i915_gem_userptr_put_pages(struct drm_i915_gem_object *obj,
-
- for_each_sgt_page(page, sgt_iter, pages) {
- if (obj->mm.dirty)
-- set_page_dirty(page);
-+ /*
-+ * As this may not be anonymous memory (e.g. shmem)
-+ * but exist on a real mapping, we have to lock
-+ * the page in order to dirty it -- holding
-+ * the page reference is not sufficient to
-+ * prevent the inode from being truncated.
-+ * Play safe and take the lock.
-+ */
-+ set_page_dirty_lock(page);
-
- mark_page_accessed(page);
- put_page(page);
---
-2.20.1
-
tick-broadcast-hrtimer-fix-a-race-in-bc_set_next.patch
perf-tools-fix-segfault-in-cpu_cache_level__read.patch
perf-stat-reset-previous-counts-on-repeat-with-inter.patch
-drm-i915-userptr-acquire-the-page-lock-around-set_pa.patch
riscv-avoid-interrupts-being-erroneously-enabled-in-.patch
arm64-ssbd-add-support-for-pstate.ssbs-rather-than-trapping-to-el3.patch
kvm-arm64-set-sctlr_el2.dssbs-if-ssbd-is-forcefully-disabled-and-vhe.patch
+++ /dev/null
-From b3505a83224e434233bf02d8a560a32b28d49ef8 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 8 Jul 2019 15:03:27 +0100
-Subject: drm/i915/userptr: Acquire the page lock around set_page_dirty()
-
-From: Chris Wilson <chris@chris-wilson.co.uk>
-
-[ Upstream commit cb6d7c7dc7ff8cace666ddec66334117a6068ce2 ]
-
-set_page_dirty says:
-
- For pages with a mapping this should be done under the page lock
- for the benefit of asynchronous memory errors who prefer a
- consistent dirty state. This rule can be broken in some special
- cases, but should be better not to.
-
-Under those rules, it is only safe for us to use the plain set_page_dirty
-calls for shmemfs/anonymous memory. Userptr may be used with real
-mappings and so needs to use the locked version (set_page_dirty_lock).
-
-Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203317
-Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl")
-References: 6dcc693bc57f ("ext4: warn when page is dirtied without buffers")
-Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-Cc: stable@vger.kernel.org
-Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-Link: https://patchwork.freedesktop.org/patch/msgid/20190708140327.26825-1-chris@chris-wilson.co.uk
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/gpu/drm/i915/i915_gem_userptr.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c
-index b02113b57d516..d43ec1d783294 100644
---- a/drivers/gpu/drm/i915/i915_gem_userptr.c
-+++ b/drivers/gpu/drm/i915/i915_gem_userptr.c
-@@ -765,7 +765,15 @@ i915_gem_userptr_put_pages(struct drm_i915_gem_object *obj)
- struct page *page = sg_page_iter_page(&sg_iter);
-
- if (obj->dirty)
-- set_page_dirty(page);
-+ /*
-+ * As this may not be anonymous memory (e.g. shmem)
-+ * but exist on a real mapping, we have to lock
-+ * the page in order to dirty it -- holding
-+ * the page reference is not sufficient to
-+ * prevent the inode from being truncated.
-+ * Play safe and take the lock.
-+ */
-+ set_page_dirty_lock(page);
-
- mark_page_accessed(page);
- page_cache_release(page);
---
-2.20.1
-
tools-lib-traceevent-do-not-free-tep-cmdlines-in-add.patch
perf-stat-fix-a-segmentation-fault-when-using-repeat.patch
perf-stat-reset-previous-counts-on-repeat-with-inter.patch
-drm-i915-userptr-acquire-the-page-lock-around-set_pa.patch
crypto-caam-fix-concurrency-issue-in-givencrypt-descriptor.patch
cfg80211-add-and-use-strongly-typed-element-iteration-macros.patch
cfg80211-use-const-more-consistently-in-for_each_element-macros.patch
+++ /dev/null
-From da7d6bc1a6cfac16136855bb8c26c841402d0109 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 8 Jul 2019 15:03:27 +0100
-Subject: drm/i915/userptr: Acquire the page lock around set_page_dirty()
-
-From: Chris Wilson <chris@chris-wilson.co.uk>
-
-[ Upstream commit cb6d7c7dc7ff8cace666ddec66334117a6068ce2 ]
-
-set_page_dirty says:
-
- For pages with a mapping this should be done under the page lock
- for the benefit of asynchronous memory errors who prefer a
- consistent dirty state. This rule can be broken in some special
- cases, but should be better not to.
-
-Under those rules, it is only safe for us to use the plain set_page_dirty
-calls for shmemfs/anonymous memory. Userptr may be used with real
-mappings and so needs to use the locked version (set_page_dirty_lock).
-
-Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203317
-Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl")
-References: 6dcc693bc57f ("ext4: warn when page is dirtied without buffers")
-Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-Cc: stable@vger.kernel.org
-Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-Link: https://patchwork.freedesktop.org/patch/msgid/20190708140327.26825-1-chris@chris-wilson.co.uk
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/gpu/drm/i915/i915_gem_userptr.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c
-index 555fd47c1831d..a761038384efb 100644
---- a/drivers/gpu/drm/i915/i915_gem_userptr.c
-+++ b/drivers/gpu/drm/i915/i915_gem_userptr.c
-@@ -689,7 +689,15 @@ i915_gem_userptr_put_pages(struct drm_i915_gem_object *obj)
-
- for_each_sgt_page(page, sgt_iter, obj->pages) {
- if (obj->dirty)
-- set_page_dirty(page);
-+ /*
-+ * As this may not be anonymous memory (e.g. shmem)
-+ * but exist on a real mapping, we have to lock
-+ * the page in order to dirty it -- holding
-+ * the page reference is not sufficient to
-+ * prevent the inode from being truncated.
-+ * Play safe and take the lock.
-+ */
-+ set_page_dirty_lock(page);
-
- mark_page_accessed(page);
- put_page(page);
---
-2.20.1
-
perf-tools-fix-segfault-in-cpu_cache_level__read.patch
perf-stat-fix-a-segmentation-fault-when-using-repeat.patch
perf-stat-reset-previous-counts-on-repeat-with-inter.patch
-drm-i915-userptr-acquire-the-page-lock-around-set_pa.patch
crypto-caam-fix-concurrency-issue-in-givencrypt-descriptor.patch
coresight-etm4x-use-explicit-barriers-on-enable-disable.patch
cfg80211-add-and-use-strongly-typed-element-iteration-macros.patch
+++ /dev/null
-From cb6d7c7dc7ff8cace666ddec66334117a6068ce2 Mon Sep 17 00:00:00 2001
-From: Chris Wilson <chris@chris-wilson.co.uk>
-Date: Mon, 8 Jul 2019 15:03:27 +0100
-Subject: drm/i915/userptr: Acquire the page lock around set_page_dirty()
-
-From: Chris Wilson <chris@chris-wilson.co.uk>
-
-commit cb6d7c7dc7ff8cace666ddec66334117a6068ce2 upstream.
-
-set_page_dirty says:
-
- For pages with a mapping this should be done under the page lock
- for the benefit of asynchronous memory errors who prefer a
- consistent dirty state. This rule can be broken in some special
- cases, but should be better not to.
-
-Under those rules, it is only safe for us to use the plain set_page_dirty
-calls for shmemfs/anonymous memory. Userptr may be used with real
-mappings and so needs to use the locked version (set_page_dirty_lock).
-
-Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203317
-Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl")
-References: 6dcc693bc57f ("ext4: warn when page is dirtied without buffers")
-Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-Cc: stable@vger.kernel.org
-Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-Link: https://patchwork.freedesktop.org/patch/msgid/20190708140327.26825-1-chris@chris-wilson.co.uk
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
---- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
-+++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
-@@ -664,7 +664,15 @@ i915_gem_userptr_put_pages(struct drm_i9
-
- for_each_sgt_page(page, sgt_iter, pages) {
- if (obj->mm.dirty)
-- set_page_dirty(page);
-+ /*
-+ * As this may not be anonymous memory (e.g. shmem)
-+ * but exist on a real mapping, we have to lock
-+ * the page in order to dirty it -- holding
-+ * the page reference is not sufficient to
-+ * prevent the inode from being truncated.
-+ * Play safe and take the lock.
-+ */
-+ set_page_dirty_lock(page);
-
- mark_page_accessed(page);
- put_page(page);
drm-nouveau-kms-nv50-don-t-create-mstms-for-edp-connectors.patch
drm-amd-powerplay-change-metrics-update-period-from-1ms-to-100ms.patch
drm-i915-gvt-update-vgpu-workload-head-pointer-correctly.patch
-drm-i915-userptr-acquire-the-page-lock-around-set_page_dirty.patch
drm-i915-to-make-vgpu-ppgtt-notificaiton-as-atomic-operation.patch
mac80211-keep-bhs-disabled-while-calling-drv_tx_wake_queue.patch
mmc-tegra-implement-set_dma_mask.patch