Commit 989d216f86bbef47059c10aca77be9f56305a7ec
Exists in
ti-lsk-linux-4.1.y
and in
12 other branches
Merge tag 'iommu-fixes-v3.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull iommu fixes from Joerg Roedel: "Three fixes for the AMD IOMMU driver: - fix a locking issue around get_user_pages() - fix two issues with device aliasing and exclusion range handling" * tag 'iommu-fixes-v3.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: fix enabling exclusion range for an exact device iommu/amd: Take mmap_sem when calling get_user_pages iommu/amd: Fix interrupt remapping for aliased devices
Showing 3 changed files Side-by-side Diff
drivers/iommu/amd_iommu.c
drivers/iommu/amd_iommu_init.c
... | ... | @@ -788,7 +788,7 @@ |
788 | 788 | * per device. But we can enable the exclusion range per |
789 | 789 | * device. This is done here |
790 | 790 | */ |
791 | - set_dev_entry_bit(m->devid, DEV_ENTRY_EX); | |
791 | + set_dev_entry_bit(devid, DEV_ENTRY_EX); | |
792 | 792 | iommu->exclusion_start = m->range_start; |
793 | 793 | iommu->exclusion_length = m->range_length; |
794 | 794 | } |
drivers/iommu/amd_iommu_v2.c
... | ... | @@ -504,8 +504,10 @@ |
504 | 504 | |
505 | 505 | write = !!(fault->flags & PPR_FAULT_WRITE); |
506 | 506 | |
507 | + down_read(&fault->state->mm->mmap_sem); | |
507 | 508 | npages = get_user_pages(fault->state->task, fault->state->mm, |
508 | 509 | fault->address, 1, write, 0, &page, NULL); |
510 | + up_read(&fault->state->mm->mmap_sem); | |
509 | 511 | |
510 | 512 | if (npages == 1) { |
511 | 513 | put_page(page); |