KVM: s390: Cleanup usage of current->mm in set_guest_storage_key
authorJason J. Herne <jjherne@us.ibm.com>
Tue, 7 Oct 2014 17:31:37 +0000 (13:31 -0400)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 28 Oct 2014 12:09:10 +0000 (13:09 +0100)
In set_guest_storage_key, we really want to reference the mm struct given as
a parameter to the function. So replace the current->mm reference with the
mm struct passed in by the caller.

Signed-off-by: Jason J. Herne <jjherne@us.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/mm/pgtable.c

index 1b79ca67392fdffc2e6dd7328717267d16d87650..cfecc241f9a459fefebbb97e7a5fa1cb92540ec5 100644 (file)
@@ -936,7 +936,7 @@ int set_guest_storage_key(struct mm_struct *mm, unsigned long addr,
 
        down_read(&mm->mmap_sem);
 retry:
-       ptep = get_locked_pte(current->mm, addr, &ptl);
+       ptep = get_locked_pte(mm, addr, &ptl);
        if (unlikely(!ptep)) {
                up_read(&mm->mmap_sem);
                return -EFAULT;