Skip to content

Commit d269ab6

Browse files
hegdevasantjoergroedel
authored andcommitted
iommu/amd/iommu_v2: Clear pasid state in free path
Clear pasid state in device amd_iommu_free_device() path. It will make sure no new ppr notifier is registered in free path. Suggested-by: Jason Gunthorpe <[email protected]> Signed-off-by: Vasant Hegde <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 534103b commit d269ab6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/iommu/amd/iommu_v2.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ static void free_pasid_states(struct device_state *dev_state)
327327

328328
put_pasid_state(pasid_state);
329329

330+
/* Clear the pasid state so that the pasid can be re-used */
331+
clear_pasid_state(dev_state, pasid_state->pasid);
332+
330333
/*
331334
* This will call the mn_release function and
332335
* unbind the PASID

0 commit comments

Comments
 (0)