iommu/amd: Don't set pasid_state->mm to NULL in unbind_pasid
authorJoerg Roedel <jroedel@suse.de>
Wed, 30 Jul 2014 14:04:37 +0000 (16:04 +0200)
committerJoerg Roedel <jroedel@suse.de>
Wed, 30 Jul 2014 14:07:49 +0000 (16:07 +0200)
commitfcaa96060809224c4d2092e1e0d6efcf0d342bb4
tree8fb3be362a38db6c038fddc8dd36a01878647304
parentd9e1611e7347b41bae8894e957a398fa41162dab
iommu/amd: Don't set pasid_state->mm to NULL in unbind_pasid

With calling te mmu_notifier_register function we hold a
reference to the mm_struct that needs to be released in
mmu_notifier_unregister. This is true even if the notifier
was already unregistered from exit_mmap and the .release
call-back has already run.

So make sure we call mmu_notifier_unregister unconditionally
in amd_iommu_unbind_pasid.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Tested-by: Oded Gabbay <oded.gabbay@amd.com>
drivers/iommu/amd_iommu_v2.c