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

2021-01-08 Thread Guenter Roeck
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.

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

2021-01-07 Thread Chatradhi, Naveen Krishna
2021 8:17 PM > To: linux-hw...@vger.kernel.org > Cc: David Arcari ; Chatradhi, Naveen Krishna > ; Jean Delvare ; > Guenter Roeck ; linux-kernel@vger.kernel.org; > sta...@vger.kernel.org > Subject: [PATCH] hwmon: (amd_energy) fix allocation of > hwmon_channel_info config >

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

2021-01-07 Thread Guenter Roeck
; Chatradhi, Naveen Krishna > ; Jean Delvare ; Guenter > Roeck ; linux-kernel@vger.kernel.org; > sta...@vger.kernel.org > Subject: [PATCH] hwmon: (amd_energy) fix allocation of hwmon_channel_info > config > > [CAUTION: External Email] > > hwmon, specifically hwmon_num_channe

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

2021-01-07 Thread Chatradhi, Naveen Krishna
...@vger.kernel.org Cc: David Arcari ; Chatradhi, Naveen Krishna ; Jean Delvare ; Guenter Roeck ; linux-kernel@vger.kernel.org; sta...@vger.kernel.org Subject: [PATCH] hwmon: (amd_energy) fix allocation of hwmon_channel_info config [CAUTION: External Email] hwmon, specifically hwmon_num_channel_attrs, expects

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

2021-01-07 Thread David Arcari
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: