Public bug reported:
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.
** Affects: linux-bluefield (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-bluefield in Ubuntu.
https://bugs.launchpad.net/bugs/2109748
Title:
bluefield_edac: uses uninitialized var in error paths
Status in linux-bluefield package in Ubuntu:
New
Bug description:
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-bluefield/+bug/2109748/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp