On Sat, Jun 14, 2025 at 12:14:49AM -0700, Nicolin Chen wrote:
@@ -671,7 +752,13 @@ static void tegra241_cmdqv_remove_vintf(struct tegra241_cmdqv *cmdqv, u16 idx) dev_dbg(cmdqv->dev, "VINTF%u: deallocated\n", vintf->idx); tegra241_cmdqv_deinit_vintf(cmdqv, idx);
- kfree(vintf);
- if (!vintf->hyp_own) {
mutex_destroy(&vintf->lvcmdq_mutex);
ida_destroy(&vintf->sids);
- }
- /* Guest-owned VINTF is free-ed with viommu by iommufd core */
- if (vintf->hyp_own)
kfree(vintf);
else ?
Otherwise looks OK to me
Reviewed-by: Jason Gunthorpe jgg@nvidia.com
Jason