On Thu, Jan 05, 2023 at 10:57:02AM +1100, Alistair Popple wrote: > Ok, although I think making this an iommu specific wrapper taking a > PASID rather than mm_struct would make the API more specific and less > likely to be misused as the mm_count/users lifetime issues could be > dealt with inside the core IOMMU code. This sounds like the ideal approach, as long as we either mmgrab() or otherwise ensure that the mm won't disappear underneath us, then use mmget_not_zero() to get a reference in this wrapper function, I think we're gravy.