On Tue, Jul 01, 2014 at 03:33:44PM -0400, Jerome Glisse wrote: > On Tue, Jul 01, 2014 at 01:00:18PM +0200, Joerg Roedel wrote: > > No, its not in this case. The file descriptor is used to connect a > > process address space with a device context. Thus without the mappings > > the file-descriptor is useless and the mappings should stay in-tact > > until the fd is closed. > > > > It would be a very bad semantic for userspace if a fd that is passed on > > fails on the other side because the sending process died. > > Consider use case where there is no file associated with the mmu_notifier > ie there is no device file descriptor that could hold and take care of > mmu_notifier destruction and cleanup. We need this call chain for this > case.
Example of such a use-case where no fd will be associated? Anyway, even without an fd, there will always be something that sets the mm->device binding up (calling mmu_notifier_register) and tears it down in the end (calling mmu_notifier_unregister). And this will be the places where any resources left from the .release call-back can be cleaned up. Joerg _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu