From: Naveen Krishna Chatradhi Date: Thu, 12 Nov 2020 17:21:59 +0000 (+0530) Subject: hwmon: (amd_energy) modify the visibility of the counters X-Git-Tag: v5.9.9~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=800c1e71804ba115dd77454692b963a3b1d8bf6f;p=thirdparty%2Fkernel%2Fstable.git hwmon: (amd_energy) modify the visibility of the counters commit 60268b0e8258fdea9a3c9f4b51e161c123571db3 upstream. This patch limits the visibility to owner and groups only for the energy counters exposed through the hwmon based amd_energy driver. Cc: stable@vger.kernel.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Naveen Krishna Chatradhi Link: https://lore.kernel.org/r/20201112172159.8781-1-nchatrad@amd.com Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hwmon/amd_energy.c b/drivers/hwmon/amd_energy.c index 29603742c8583..0dee535e6c851 100644 --- a/drivers/hwmon/amd_energy.c +++ b/drivers/hwmon/amd_energy.c @@ -209,7 +209,7 @@ static umode_t amd_energy_is_visible(const void *_data, enum hwmon_sensor_types type, u32 attr, int channel) { - return 0444; + return 0440; } static int energy_accumulator(void *p)