+9
−8
Loading
stable inclusion from stable-v6.6.81 commit 01d5165304741880e2a4fa192be381e9468ad1c5 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IBYZED Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=01d5165304741880e2a4fa192be381e9468ad1c5 -------------------------------- commit 0d39844150546fa1415127c5fbae26db64070dd3 upstream. A low attr::freq value cannot be set via IOC_PERIOD on some platforms. The perf_event_check_period() introduced in: 81ec3f3c ("perf/x86: Add check_period PMU callback") was intended to check the period, rather than the frequency. A low frequency may be mistakenly rejected by limit_period(). Fix it. Fixes: 81ec3f3c ("perf/x86: Add check_period PMU callback") Signed-off-by:Kan Liang <kan.liang@linux.intel.com> Signed-off-by:
Ingo Molnar <mingo@kernel.org> Reviewed-by:
Ravi Bangoria <ravi.bangoria@amd.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250117151913.3043942-2-kan.liang@linux.intel.com Closes: https://lore.kernel.org/lkml/20250115154949.3147-1-ravi.bangoria@amd.com/ Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 01d5165304741880e2a4fa192be381e9468ad1c5) Signed-off-by:
Wentao Guan <guanwentao@uniontech.com>