Re: [PATCH] powercap/intel_rapl: fix and tidy up error handling
From: "Rafael J. Wysocki" <rafael@kernel.org>
Date: 2016-11-24 21:07:45
Also in:
lkml
From: "Rafael J. Wysocki" <rafael@kernel.org>
Date: 2016-11-24 21:07:45
Also in:
lkml
On Wed, Nov 23, 2016 at 8:01 PM, Jacob Pan [off-list ref] wrote:
Commit e1399ba20eee ("powercap / RAPL: handle missing MSRs") added
contraint_to_pl() function to return index into an array. But it
can potentially return -EINVAL if powercap layer sends an out of
range constraint ID. This patch adds sanity check.
Unnecessary RAPL domain pointer check is removed since it must be
initialized before calling rapl_unit_xlate().
Reported-by: Odzioba, Lukasz <redacted>
Reported-by: Koss, Marcin <redacted>Does this depend on the Thomas' series only? Also, it looks like a Fixes: tag should be present here.
Signed-off-by: Jacob Pan <redacted>
Thanks, Rafael