Commit a235e7d0 authored by Shuicheng Lin's avatar Shuicheng Lin Committed by Matt Roper
Browse files

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: b30d5de3 ("drm/xe/configfs: Add mid context restore bb")
Signed-off-by: default avatarShuicheng Lin <shuicheng.lin@intel.com>
Reviewed-by: default avatarNitin Gote <nitin.r.gote@intel.com>
Link: https://patch.msgid.link/20260225013448.3547687-2-shuicheng.lin@intel.com


Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
parent 9941b3ca
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
}