Message ID | 161850488487.7302.7018870513204678832.stgit@brunhilda (mailing list archive) |
---|---|
Headers | show |
Series | smartpqi fix static checker issues | expand |
Don, > This set corrects two static checker warnings found by Dan Carpenter > <dan.carpenter@oracle.com> Applied to 5.13/scsi-staging, thanks!
On Thu, 15 Apr 2021 11:41:58 -0500, Don Brace wrote: > These patches are based on Martin Peterson's 5.13/scsi-queue tree > > This set corrects two static checker warnings found by > Dan Carpenter <dan.carpenter@oracle.com> > > smartpqi-fix-blocks_per_row-static-checker-issue > Link: https://lore.kernel.org/linux-scsi/YG%2F5kWHHAr7w5dU5@mwanda/ > Fixes: 6702d2c40f31 ("scsi: smartpqi: Add support for RAID5 and RAID6 writes") > Using rmd->blocks_per_row as a divisor without checking > it for 0 first. > The variable blocks_per_row is used as a divisor in many > raid_map calculations. This can lead to a divide by 0. > This patch prevents a possible divide by 0. If the member > is 0, return PQI_RAID_BYPASS_INELIGIBLE before any division is > performed. The current check for a non-0 value was after multiple > divisions were performed. > > [...] Applied to 5.13/scsi-queue, thanks! [1/2] smartpqi: fix blocks_per_row static checker issue https://git.kernel.org/mkp/scsi/c/667298ceaf04 [2/2] smartpqi: fix device pointer variable reference static checker issue https://git.kernel.org/mkp/scsi/c/5cad5a507241