[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <5242D207.10306@t-online.de>
Date: Wed, 25 Sep 2013 14:07:35 +0200
From: Knut Petersen <Knut_Petersen@...nline.de>
To: Linus Torvalds <torvalds@...ux-foundation.org>
CC: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH] perf: Prevent divide by zero exception in kernel/events/core.c
Any value written to /proc/sys/kernel/perf_event_max_sample_rate
is accepted and used as a divisor in perf_proc_update_handler().
Obviously that is wrong. 0 will cause a divide by 0 exception,
and negative values are unreasonable.
The attached patch enforces a lower limit of 1.
cu,
Knut
View attachment "0001-Enforce-1-as-lower-limit-for-perf_event_max_sample_r.patch" of type "text/x-patch" (1123 bytes)
Powered by blists - more mailing lists