diff options
-rw-r--r-- | drivers/vfio/vfio_iommu_type1.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index 9266271a787a..77373e51b283 100644 --- a/drivers/vfio/vfio_iommu_type1.c +++ b/drivers/vfio/vfio_iommu_type1.c | |||
@@ -495,8 +495,7 @@ static int vfio_pin_page_external(struct vfio_dma *dma, unsigned long vaddr, | |||
495 | unsigned long *pfn_base, bool do_accounting) | 495 | unsigned long *pfn_base, bool do_accounting) |
496 | { | 496 | { |
497 | unsigned long limit; | 497 | unsigned long limit; |
498 | bool lock_cap = ns_capable(task_active_pid_ns(dma->task)->user_ns, | 498 | bool lock_cap = has_capability(dma->task, CAP_IPC_LOCK); |
499 | CAP_IPC_LOCK); | ||
500 | struct mm_struct *mm; | 499 | struct mm_struct *mm; |
501 | int ret; | 500 | int ret; |
502 | bool rsvd; | 501 | bool rsvd; |