Patch "scsi: myrs: Fix crash in error case" has been added to the 5.16-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: myrs: Fix crash in error case

to the 5.16-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-myrs-fix-crash-in-error-case.patch
and it can be found in the queue-5.16 subdirectory.

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



commit 39234d7235a1ba0579b2fd775ba7b48866d14962
Author: Tong Zhang <ztong0001@xxxxxxxxx>
Date:   Sun Jan 23 14:57:17 2022 -0800

    scsi: myrs: Fix crash in error case
    
    [ Upstream commit 4db09593af0b0b4d7d4805ebb3273df51d7cc30d ]
    
    In myrs_detect(), cs->disable_intr is NULL when privdata->hw_init() fails
    with non-zero. In this case, myrs_cleanup(cs) will call a NULL ptr and
    crash the kernel.
    
    [    1.105606] myrs 0000:00:03.0: Unknown Initialization Error 5A
    [    1.105872] myrs 0000:00:03.0: Failed to initialize Controller
    [    1.106082] BUG: kernel NULL pointer dereference, address: 0000000000000000
    [    1.110774] Call Trace:
    [    1.110950]  myrs_cleanup+0xe4/0x150 [myrs]
    [    1.111135]  myrs_probe.cold+0x91/0x56a [myrs]
    [    1.111302]  ? DAC960_GEM_intr_handler+0x1f0/0x1f0 [myrs]
    [    1.111500]  local_pci_probe+0x48/0x90
    
    Link: https://lore.kernel.org/r/20220123225717.1069538-1-ztong0001@xxxxxxxxx
    Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
    Signed-off-by: Tong Zhang <ztong0001@xxxxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c
index 6ea323e9a2e34..f6dbc8f2f60a3 100644
--- a/drivers/scsi/myrs.c
+++ b/drivers/scsi/myrs.c
@@ -2269,7 +2269,8 @@ static void myrs_cleanup(struct myrs_hba *cs)
 	myrs_unmap(cs);
 
 	if (cs->mmio_base) {
-		cs->disable_intr(cs);
+		if (cs->disable_intr)
+			cs->disable_intr(cs);
 		iounmap(cs->mmio_base);
 		cs->mmio_base = NULL;
 	}



[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