Skip to content

Commit e377182

Browse files
ShuichengLinrodrigovivi
authored andcommitted
drm/xe/configfs: Free ctx_restore_mid_bb in release
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: b30d5de ("drm/xe/configfs: Add mid context restore bb") Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com> Reviewed-by: Nitin Gote <nitin.r.gote@intel.com> Link: https://patch.msgid.link/20260225013448.3547687-2-shuicheng.lin@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com> (cherry picked from commit a235e7d) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent cdc8a1e commit e377182

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/gpu/drm/xe/xe_configfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,7 @@ static void xe_config_device_release(struct config_item *item)
830830

831831
mutex_destroy(&dev->lock);
832832

833+
kfree(dev->config.ctx_restore_mid_bb[0].cs);
833834
kfree(dev->config.ctx_restore_post_bb[0].cs);
834835
kfree(dev);
835836
}

0 commit comments

Comments
 (0)