Re: [PATCH] hwmon: (amd_energy) fix allocation of hwmon_channel_info config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 07, 2021 at 09:47:07AM -0500, David Arcari wrote:
> hwmon, specifically hwmon_num_channel_attrs, expects the config
> array in the hwmon_channel_info structure to be terminated by
> a zero entry.  amd_energy does not honor this convention.  As
> result, a KASAN warning is possible.  Fix this by adding an
> additional entry and setting it to zero.
> 
> Fixes: 8abee9566b7e ("hwmon: Add amd_energy driver to report energy counters")
> 
> Signed-off-by: David Arcari <darcari@xxxxxxxxxx>
> Cc: Naveen Krishna Chatradhi <nchatrad@xxxxxxx>
> Cc: Jean Delvare <jdelvare@xxxxxxxx>
> Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: David Arcari <darcari@xxxxxxxxxx>
> Acked-by: Naveen Krishna Chatradhi <nchatrad@xxxxxxx>

Applied.

Thanks,
Guenter



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux