]> git.karo-electronics.de Git - linux-beck.git/commit
perf: Enforce 1 as lower limit for perf_event_max_sample_rate
authorKnut Petersen <Knut_Petersen@t-online.de>
Wed, 25 Sep 2013 12:29:37 +0000 (14:29 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 4 Oct 2013 08:06:07 +0000 (10:06 +0200)
commit723478c8a471403c53cf144999701f6e0c4bbd11
treed89b59d4318eb5e37082f90880ac20b18f81a020
parent354cc40e3b0981c38ba2ce2964954480e6c03c37
perf: Enforce 1 as lower limit for perf_event_max_sample_rate

/proc/sys/kernel/perf_event_max_sample_rate will accept
negative values as well as 0.

Negative values are unreasonable, and 0 causes a
divide by zero exception in perf_proc_update_handler.

This patch enforces a lower limit of 1.

Signed-off-by: Knut Petersen <Knut_Petersen@t-online.de>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/5242DB0C.4070005@t-online.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c
kernel/sysctl.c