Patch "scsi: qla2xxx: Always check the return value of qla24xx_get_isp_stats()" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: qla2xxx: Always check the return value of qla24xx_get_isp_stats()

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-qla2xxx-always-check-the-return-value-of-qla24x.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f4c4b3443d789dcf3e3bd2159f541748d51201d9
Author: Bart Van Assche <bvanassche@xxxxxxx>
Date:   Sat Mar 20 16:23:58 2021 -0700

    scsi: qla2xxx: Always check the return value of qla24xx_get_isp_stats()
    
    [ Upstream commit a2b2cc660822cae08c351c7f6b452bfd1330a4f7 ]
    
    This patch fixes the following Coverity warning:
    
        CID 361199 (#1 of 1): Unchecked return value (CHECKED_RETURN)
        3. check_return: Calling qla24xx_get_isp_stats without checking return
        value (as is done elsewhere 4 out of 5 times).
    
    Link: https://lore.kernel.org/r/20210320232359.941-7-bvanassche@xxxxxxx
    Cc: Quinn Tran <qutran@xxxxxxxxxxx>
    Cc: Mike Christie <michael.christie@xxxxxxxxxx>
    Cc: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx>
    Cc: Daniel Wagner <dwagner@xxxxxxx>
    Cc: Lee Duncan <lduncan@xxxxxxxx>
    Reviewed-by: Daniel Wagner <dwagner@xxxxxxx>
    Reviewed-by: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx>
    Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index bed7e8637217..580d30cd5c35 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -2691,6 +2691,8 @@ qla2x00_reset_host_stats(struct Scsi_Host *shost)
 	vha->qla_stats.jiffies_at_last_reset = get_jiffies_64();
 
 	if (IS_FWI2_CAPABLE(ha)) {
+		int rval;
+
 		stats = dma_alloc_coherent(&ha->pdev->dev,
 		    sizeof(*stats), &stats_dma, GFP_KERNEL);
 		if (!stats) {
@@ -2700,7 +2702,11 @@ qla2x00_reset_host_stats(struct Scsi_Host *shost)
 		}
 
 		/* reset firmware statistics */
-		qla24xx_get_isp_stats(base_vha, stats, stats_dma, BIT_0);
+		rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma, BIT_0);
+		if (rval != QLA_SUCCESS)
+			ql_log(ql_log_warn, vha, 0x70de,
+			       "Resetting ISP statistics failed: rval = %d\n",
+			       rval);
 
 		dma_free_coherent(&ha->pdev->dev, sizeof(*stats),
 		    stats, stats_dma);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux