Re: [syzbot] [io-uring?] [mm?] general protection fault in lock_vma_under_rcu
From: Edward Adam Davis
Date: Tue Feb 25 2025 - 03:37:31 EST
#syz test
diff --git a/mm/memory.c b/mm/memory.c
index d5c4f932b399..a5b1832ec8f6 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -6492,8 +6492,7 @@ 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)) {
+ if (IS_ERR_OR_NULL(vma_start_read(mm, vma))) {
/* Check if the VMA got isolated after we found it */
if (PTR_ERR(vma) == -EAGAIN) {
count_vm_vma_lock_event(VMA_LOCK_MISS);