Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/configfs: Free ctx_restore_mid_bb in release
@ 2026-02-25  1:34 Shuicheng Lin
  2026-02-25  1:45 ` ✓ CI.KUnit: success for " Patchwork
                   ` (11 more replies)
  0 siblings, 12 replies; 17+ messages in thread
From: Shuicheng Lin @ 2026-02-25  1:34 UTC (permalink / raw)
  To: intel-xe; +Cc: Shuicheng Lin

ctx_restore_mid_bb memory is allocated in wa_bb_store(), but
xe_config_device_release() only frees ctx_restore_post_bb.

Free ctx_restore_mid_bb[0].cs as well to avoid leaking the allocation
when the configfs device is removed.

Fixes: b30d5de3d40c ("drm/xe/configfs: Add mid context restore bb")
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
---
 drivers/gpu/drm/xe/xe_configfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
index d8c3fbe81aa6..af1599f21338 100644
--- a/drivers/gpu/drm/xe/xe_configfs.c
+++ b/drivers/gpu/drm/xe/xe_configfs.c
@@ -833,6 +833,7 @@ static void xe_config_device_release(struct config_item *item)
 
 	mutex_destroy(&dev->lock);
 
+	kfree(dev->config.ctx_restore_mid_bb[0].cs);
 	kfree(dev->config.ctx_restore_post_bb[0].cs);
 	kfree(dev);
 }
-- 
2.50.1


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

end of thread, other threads:[~2026-02-26 22:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-25  1:34 [PATCH] drm/xe/configfs: Free ctx_restore_mid_bb in release Shuicheng Lin
2026-02-25  1:45 ` ✓ CI.KUnit: success for " Patchwork
2026-02-25  2:18 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-02-25  3:57 ` ✓ CI.KUnit: success for drm/xe/configfs: Free ctx_restore_mid_bb in release (rev2) Patchwork
2026-02-25  4:31 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-02-25 10:09 ` ✗ Xe.CI.FULL: " Patchwork
2026-02-25 16:11 ` ✓ CI.KUnit: success for drm/xe/configfs: Free ctx_restore_mid_bb in release (rev3) Patchwork
2026-02-25 16:46 ` ✓ Xe.CI.BAT: " Patchwork
2026-02-25 20:08 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-02-26 16:41   ` Lin, Shuicheng
2026-02-26  2:08 ` ✓ CI.KUnit: success for drm/xe/configfs: Free ctx_restore_mid_bb in release (rev4) Patchwork
2026-02-26  2:44 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-02-26 16:15   ` Lin, Shuicheng
2026-02-26  7:46 ` ✗ Xe.CI.FULL: " Patchwork
2026-02-26 16:33   ` Lin, Shuicheng
2026-02-26 22:15     ` Matt Roper
2026-02-26 12:49 ` [PATCH] drm/xe/configfs: Free ctx_restore_mid_bb in release Gote, Nitin R

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox