perf_counter: per user mlock gift

Instead of a per-process mlock gift for perf-counters, use a
per-user gift so that there is less of a DoS potential.

[ Impact: allow less worst-case unprivileged memory consumption ]

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <20090515132018.496182835@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Peter Zijlstra
2009-05-15 15:19:27 +02:00
committed by Ingo Molnar
parent 548e1ddf25
commit 789f90fcf6
2 changed files with 19 additions and 7 deletions

View File

@@ -674,6 +674,10 @@ struct user_struct {
struct work_struct work;
#endif
#endif
#ifdef CONFIG_PERF_COUNTERS
atomic_long_t locked_vm;
#endif
};
extern int uids_sysfs_init(void);