All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 1/2] drm/i915: Fix a potential UAF at device unload
@ 2022-09-23  7:35 Nirmoy Das
  2022-09-23  7:35 ` [Intel-gfx] [PATCH 2/2] drm/i915: remove excessive i915_gem_drain_freed_objects Nirmoy Das
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Nirmoy Das @ 2022-09-23  7:35 UTC (permalink / raw)
  To: intel-gfx; +Cc: chris.p.wilson, matthew.auld

i915_gem_drain_freed_objects() might not be enough to
free all the objects and RCU delayed work might get
scheduled after the i915 device struct gets freed.

Call i915_gem_drain_workqueue() to catch all RCU delayed work.

Suggested-by: Chris Wilson <chris.p.wilson@intel.com>
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 88df9a35e0fe..7541028caebd 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1278,7 +1278,7 @@ void i915_gem_init_early(struct drm_i915_private *dev_priv)
 
 void i915_gem_cleanup_early(struct drm_i915_private *dev_priv)
 {
-	i915_gem_drain_freed_objects(dev_priv);
+	i915_gem_drain_workqueue(dev_priv);
 	GEM_BUG_ON(!llist_empty(&dev_priv->mm.free_list));
 	GEM_BUG_ON(atomic_read(&dev_priv->mm.free_count));
 	drm_WARN_ON(&dev_priv->drm, dev_priv->mm.shrink_count);
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [Intel-gfx] [PATCH 1/2] drm/i915: Fix a potential UAF at device unload
@ 2022-09-08 20:07 Nirmoy Das
  2022-09-09  8:55 ` Tvrtko Ursulin
  0 siblings, 1 reply; 21+ messages in thread
From: Nirmoy Das @ 2022-09-08 20:07 UTC (permalink / raw)
  To: intel-gfx; +Cc: matthew.auld

i915_gem_drain_freed_objects() might not be enough to
free all the objects and RCU delayed work might get
scheduled after the i915 device struct gets freed.

Call i915_gem_drain_workqueue() to catch all RCU delayed work.

Suggested-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0f49ec9d494a..e8a053eaaa89 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1254,7 +1254,7 @@ void i915_gem_init_early(struct drm_i915_private *dev_priv)
 
 void i915_gem_cleanup_early(struct drm_i915_private *dev_priv)
 {
-	i915_gem_drain_freed_objects(dev_priv);
+	i915_gem_drain_workqueue(dev_priv);
 	GEM_BUG_ON(!llist_empty(&dev_priv->mm.free_list));
 	GEM_BUG_ON(atomic_read(&dev_priv->mm.free_count));
 	drm_WARN_ON(&dev_priv->drm, dev_priv->mm.shrink_count);
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2022-11-02 18:37 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-23  7:35 [Intel-gfx] [PATCH 1/2] drm/i915: Fix a potential UAF at device unload Nirmoy Das
2022-09-23  7:35 ` [Intel-gfx] [PATCH 2/2] drm/i915: remove excessive i915_gem_drain_freed_objects Nirmoy Das
2022-09-27  7:43   ` Andrzej Hajda
2022-09-23  8:42 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Fix a potential UAF at device unload Patchwork
2022-09-23 19:50 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-09-26 20:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Fix a potential UAF at device unload (rev2) Patchwork
2022-09-27  5:49 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-09-27  7:43 ` [Intel-gfx] [PATCH 1/2] drm/i915: Fix a potential UAF at device unload Andrzej Hajda
2022-09-29 11:32 ` Andi Shyti
2022-09-29 11:36   ` Das, Nirmoy
2022-10-21 16:34 ` Ville Syrjälä
2022-10-24  8:08   ` Das, Nirmoy
2022-11-02 17:55     ` Ville Syrjälä
2022-11-02 18:37       ` Das, Nirmoy
  -- strict thread matches above, loose matches on Subject: below --
2022-09-08 20:07 Nirmoy Das
2022-09-09  8:55 ` Tvrtko Ursulin
2022-09-21 15:53   ` Das, Nirmoy
2022-09-22  9:37     ` Tvrtko Ursulin
2022-09-22 12:11       ` Das, Nirmoy
2022-09-22 12:28         ` Tvrtko Ursulin
2022-09-22 12:32           ` Das, Nirmoy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.