ACK: [SRU][J:linux-bluefield][PATCH v1 0/1] bluefield_edac: uses uninitialized var in error paths

Jacob Martin jacob.martin at canonical.com
Tue May 6 14:25:21 UTC 2025


On 5/2/25 11:14 AM, David Thompson wrote:
> BugLink: https://bugs.launchpad.net/bugs/2109748
> 
> SRU Justification:
> 
> [Impact]
> 
> The 'smatch' static analyzer tool raised 5 warnings against the EDAC driver.
> There is one warning for each call to "bluefield_edac_readl()" since the code
> uses the result of the function call even if there is an error (leaving
> resulting value uninitialized).
> 
> [Fix]
> 
> If the call to "bluefield_edac_readl()" fails, then the driver should log
> details of the failure and then return early. The driver should not continue
> after "bluefield_edac_readl()" failure and use the uninitialized variable.
> 
> [Test Case]
> 
> Boot image on BF2 platform
> Ensure bluefield_edac driver is loaded [see output of "lsmod"]
> Ensure there are no errors or failures from EDAC driver [see output of "dmesg"]
> 
> [Regression Potential]
> 
> This patch improves code quality in the error paths of the driver, no regression expected.
> 
> David Thompson (1):
>    UBUNTU: SAUCE: EDAC/bluefield: dont use bluefield_edac_readl result on error
> 
>   drivers/edac/bluefield_edac.c | 20 +++++++++++++++-----
>   1 file changed, 15 insertions(+), 5 deletions(-)
> 

Acked-by: Jacob Martin <jacob.martin at canonical.com>




More information about the kernel-team mailing list