Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334758
b: refs/heads/master
c: e40cfce
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov committed Sep 29, 2012
1 parent eae6aba commit 9ffaeaa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78a320542e6cdb2800cd736b2d136e4261d34f43
refs/heads/master: e40cfce626a5537994058ee9a940dcfdc0f68ef0
13 changes: 4 additions & 9 deletions trunk/kernel/events/uprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,12 @@ struct uprobe {
*/
static bool valid_vma(struct vm_area_struct *vma, bool is_register)
{
if (!vma->vm_file)
return false;

if (!is_register)
return true;
vm_flags_t flags = VM_HUGETLB | VM_MAYEXEC | VM_SHARED;

if ((vma->vm_flags & (VM_HUGETLB | VM_WRITE | VM_MAYEXEC | VM_SHARED))
== VM_MAYEXEC)
return true;
if (is_register)
flags |= VM_WRITE;

return false;
return vma->vm_file && (vma->vm_flags & flags) == VM_MAYEXEC;
}

static unsigned long offset_to_vaddr(struct vm_area_struct *vma, loff_t offset)
Expand Down

0 comments on commit 9ffaeaa

Please sign in to comment.