Skip to content

Commit fca1fdd

Browse files
kirylhansendc
authored andcommitted
x86/mm/iommu/sva: Fix error code for LAM enabling failure due to SVA
Normally, LAM and SVA are mutually exclusive. LAM enabling will fail if SVA is already in use. Correct error code for the failure. EINTR is nonsensical there. Fixes: 23e5d9e ("x86/mm/iommu/sva: Make LAM and SVA mutually exclusive") Reported-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com> Link: https://lore.kernel.org/all/CACT4Y+YfqSMsZArhh25TESmG-U4jO5Hjphz87wKSnTiaw2Wrfw@mail.gmail.com Link: https://lore.kernel.org/all/20230403111020.3136-2-kirill.shutemov%40linux.intel.com
1 parent dfd7a15 commit fca1fdd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/x86/kernel/process_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ static int prctl_enable_tagged_addr(struct mm_struct *mm, unsigned long nr_bits)
758758

759759
if (mm_valid_pasid(mm) &&
760760
!test_bit(MM_CONTEXT_FORCE_TAGGED_SVA, &mm->context.flags))
761-
return -EINTR;
761+
return -EINVAL;
762762

763763
if (mmap_write_lock_killable(mm))
764764
return -EINTR;

0 commit comments

Comments
 (0)