From: Shuicheng Lin <shuicheng.lin@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Shuicheng Lin <shuicheng.lin@intel.com>
Subject: [PATCH] drm/xe/configfs: Free ctx_restore_mid_bb in release
Date: Wed, 25 Feb 2026 01:34:49 +0000 [thread overview]
Message-ID: <20260225013448.3547687-2-shuicheng.lin@intel.com> (raw)
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
next reply other threads:[~2026-02-25 1:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 1:34 Shuicheng Lin [this message]
2026-02-25 1:45 ` ✓ CI.KUnit: success for drm/xe/configfs: Free ctx_restore_mid_bb in release 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260225013448.3547687-2-shuicheng.lin@intel.com \
--to=shuicheng.lin@intel.com \
--cc=intel-xe@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox