[PATCH] mm/gup: remove vmas parameter from get_user_pages_remote()
From: Lorenzo Stoakes
Date: Sat Apr 15 2023 - 06:09:15 EST
Correct vma NULL check as indicated by Tetsuo.
Signed-off-by: Lorenzo Stoakes <lstoakes@xxxxxxxxx>
---
kernel/events/uprobes.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index b21993cd2dcc..affe42a13eff 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -479,8 +479,10 @@ int uprobe_write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm,
return ret;
vma = vma_lookup(mm, vaddr);
- if (!vma)
+ if (!vma) {
+ ret = -EINVAL;
goto put_old;
+ }
ret = verify_opcode(old_page, vaddr, &opcode);
if (ret <= 0)
--
2.40.0