diff --git a/mm/memory.c b/mm/memory.c
index d5c4f932b399..f67670cb2e22 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -6484,7 +6484,7 @@ struct vm_area_struct *lock_vma_under_rcu(struct mm_struct *mm,
 					  unsigned long address)
 {
 	MA_STATE(mas, &mm->mm_mt, address, address);
-	struct vm_area_struct *vma;
+	struct vm_area_struct *vma, *vma2;
 
 	rcu_read_lock();
 retry:
@@ -6492,10 +6492,10 @@ struct vm_area_struct *lock_vma_under_rcu(struct mm_struct *mm,
 	if (!vma)
 		goto inval;
 
-	vma = vma_start_read(mm, vma);
-	if (IS_ERR_OR_NULL(vma)) {
+	vma2 = vma_start_read(mm, vma);
+	if (IS_ERR_OR_NULL(vma2)) {
 		/* Check if the VMA got isolated after we found it */
-		if (PTR_ERR(vma) == -EAGAIN) {
+		if (PTR_ERR(vma2) == -EAGAIN) {
 			count_vm_vma_lock_event(VMA_LOCK_MISS);
 			/* The area was replaced with another one */
 			goto retry;