Skip to content

Commit 83e3dc9

Browse files
anakryikoPeter Zijlstra
authored andcommitted
uprobes: simplify find_active_uprobe_rcu() VMA checks
At the point where find_active_uprobe_rcu() is used we know that VMA in question has triggered software breakpoint, so we don't need to validate vma->vm_flags. Keep only vma->vm_file NULL check. Suggested-by: Oleg Nesterov <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Masami Hiramatsu (Google) <[email protected]> Acked-by: Oleg Nesterov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 03a001b commit 83e3dc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/events/uprobes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2304,7 +2304,7 @@ static struct uprobe *find_active_uprobe_rcu(unsigned long bp_vaddr, int *is_swb
23042304
mmap_read_lock(mm);
23052305
vma = vma_lookup(mm, bp_vaddr);
23062306
if (vma) {
2307-
if (valid_vma(vma, false)) {
2307+
if (vma->vm_file) {
23082308
struct inode *inode = file_inode(vma->vm_file);
23092309
loff_t offset = vaddr_to_offset(vma, bp_vaddr);
23102310

0 commit comments

Comments
 (0)