Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199093
b: refs/heads/master
c: c792061
h: refs/heads/master
i:
  199091: b8e63ae
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed May 18, 2010
1 parent a61bfb4 commit 1a11e8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a19d35c11fd559dd7dfd5a2078df7c9af74a5d88
refs/heads/master: c7920614cebbf269a7c8397ff959a8dcf727465c
8 changes: 8 additions & 0 deletions trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2593,6 +2593,14 @@ static int perf_mmap(struct file *file, struct vm_area_struct *vma)
long user_extra, extra;
int ret = 0;

/*
* Don't allow mmap() of inherited per-task counters. This would
* create a performance issue due to all children writing to the
* same buffer.
*/
if (event->cpu == -1 && event->attr.inherit)
return -EINVAL;

if (!(vma->vm_flags & VM_SHARED))
return -EINVAL;

Expand Down

0 comments on commit 1a11e8d

Please sign in to comment.