]> git.baikalelectronics.ru Git - kernel.git/commit
s390/cpum_sf: ensure sample frequency of perf event attributes is non-zero
authorHendrik Brueckner <brueckner@linux.ibm.com>
Thu, 3 May 2018 13:56:15 +0000 (15:56 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 8 May 2018 13:56:36 +0000 (15:56 +0200)
commitbc9ac6d5500342230f52d6b57c51c608c521ce66
tree1d1189bb322ed2104b9c3d7560a1a151942aef88
parent8d43570dd7710bee96c097e10fe0baac9e8cb292
s390/cpum_sf: ensure sample frequency of perf event attributes is non-zero

Correct a trinity finding for the perf_event_open() system call with
a perf event attribute structure that uses a frequency but has the
sampling frequency set to zero.  This causes a FP divide exception during
the sample rate initialization for the hardware sampling facility.

Fixes: 846545c6f1f84 ("s390/perf: add support for the CPU-Measurement Sampling Facility")
Cc: stable@vger.kernel.org # 3.14+
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/perf_cpum_sf.c