aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/perf_counter.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/perf_counter.c')
-rw-r--r--kernel/perf_counter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index 36f65e2b8b57..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 */
53int sysctl_perf_counter_paranoid __read_mostly; 53int sysctl_perf_counter_paranoid __read_mostly = 1;
54 54
55static inline bool perf_paranoid_cpu(void) 55static inline bool perf_paranoid_cpu(void)
56{ 56{
@@ -1791,7 +1791,7 @@ static int perf_counter_read_group(struct perf_counter *counter,
1791 size += err; 1791 size += err;
1792 1792
1793 list_for_each_entry(sub, &leader->sibling_list, list_entry) { 1793 list_for_each_entry(sub, &leader->sibling_list, list_entry) {
1794 err = perf_counter_read_entry(counter, read_format, 1794 err = perf_counter_read_entry(sub, read_format,
1795 buf + size); 1795 buf + size);
1796 if (err < 0) 1796 if (err < 0)
1797 return err; 1797 return err;
@@ -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