diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-05 16:48:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-05 16:48:37 -0400 |
commit | 93697a3cabd3605c434a9b915c0272ad800b3f97 (patch) | |
tree | dc26826f10979e02efbd2c6a87b326b770284b18 /kernel | |
parent | 63995344721be45b3fb3b76488b1b0a8c95def26 (diff) | |
parent | a3df6f7d3090e611bcc774cd2cba45ae016d37e1 (diff) |
Merge branch 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf_counter/powerpc: Fix cache event codes for POWER7
perf_counter: Fix /0 bug in swcounters
perf_counters: Increase paranoia level
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/perf_counter.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c index f274e1959885..d7cbc579fc80 100644 --- a/kernel/perf_counter.c +++ b/kernel/perf_counter.c | |||
@@ -50,7 +50,7 @@ static atomic_t nr_task_counters __read_mostly; | |||
50 | * 1 - disallow cpu counters to unpriv | 50 | * 1 - disallow cpu counters to unpriv |
51 | * 2 - disallow kernel profiling to unpriv | 51 | * 2 - disallow kernel profiling to unpriv |
52 | */ | 52 | */ |
53 | int sysctl_perf_counter_paranoid __read_mostly; | 53 | int sysctl_perf_counter_paranoid __read_mostly = 1; |
54 | 54 | ||
55 | static inline bool perf_paranoid_cpu(void) | 55 | static inline bool perf_paranoid_cpu(void) |
56 | { | 56 | { |
@@ -4066,6 +4066,7 @@ perf_counter_alloc(struct perf_counter_attr *attr, | |||
4066 | hwc->sample_period = attr->sample_period; | 4066 | hwc->sample_period = attr->sample_period; |
4067 | if (attr->freq && attr->sample_freq) | 4067 | if (attr->freq && attr->sample_freq) |
4068 | hwc->sample_period = 1; | 4068 | hwc->sample_period = 1; |
4069 | hwc->last_period = hwc->sample_period; | ||
4069 | 4070 | ||
4070 | atomic64_set(&hwc->period_left, hwc->sample_period); | 4071 | atomic64_set(&hwc->period_left, hwc->sample_period); |
4071 | 4072 | ||