File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -208,6 +208,7 @@ void iommufd_fault_destroy(struct iommufd_object *obj)
208208{
209209 struct iommufd_fault * fault = container_of (obj , struct iommufd_fault , obj );
210210 struct iopf_group * group , * next ;
211+ unsigned long index ;
211212
212213 /*
213214 * The iommufd object's reference count is zero at this point.
@@ -220,6 +221,13 @@ void iommufd_fault_destroy(struct iommufd_object *obj)
220221 iopf_group_response (group , IOMMU_PAGE_RESP_INVALID );
221222 iopf_free_group (group );
222223 }
224+ xa_for_each (& fault -> response , index , group ) {
225+ xa_erase (& fault -> response , index );
226+ iopf_group_response (group , IOMMU_PAGE_RESP_INVALID );
227+ iopf_free_group (group );
228+ }
229+ xa_destroy (& fault -> response );
230+ mutex_destroy (& fault -> mutex );
223231}
224232
225233static void iommufd_compose_fault_message (struct iommu_fault * fault ,
You can’t perform that action at this time.
0 commit comments