Re: [PATCH v2 01/45] arm_mpam: Stop using uninitialized variables in __ris_msmon_read()

From: Jonathan Cameron

Date: Tue Dec 23 2025 - 06:58:07 EST


On Fri, 19 Dec 2025 18:11:03 +0000
Ben Horgan <ben.horgan@xxxxxxx> wrote:

> Dan has reported two uses of uninitialized variables in __ris_msmon_read().
> If an unknown monitor type is encountered then the local variable, now, is
> used uninitialized. Fix this by returning early on error. If a non-mbwu
> monitor is being read then the local variable, overflow, is not initialized
> but still read. Initialize it to false as overflow is not relevant for csu
> monitors.
>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Closes: https://lore.kernel.org/r/202512091519.RBwiJcSq-lkp@xxxxxxxxx/
> Closes: https://lore.kernel.org/r/202512100547.N7QPYgfb-lkp@xxxxxxxxx/
> Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>