Patch "scsi: dc395: Fix error case unwinding" has been added to the 4.14-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: dc395: Fix error case unwinding

to the 4.14-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-dc395-fix-error-case-unwinding.patch
and it can be found in the queue-4.14 subdirectory.

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



commit f807077aa91304e24ae8645d74dbb39c0ab11cd7
Author: Tong Zhang <ztong0001@xxxxxxxxx>
Date:   Mon Sep 6 21:07:02 2021 -0700

    scsi: dc395: Fix error case unwinding
    
    [ Upstream commit cbd9a3347c757383f3d2b50cf7cfd03eb479c481 ]
    
    dc395x_init_one()->adapter_init() might fail. In this case, the acb is
    already cleaned up by adapter_init(), no need to do that in
    adapter_uninit(acb) again.
    
    [    1.252251] dc395x: adapter init failed
    [    1.254900] RIP: 0010:adapter_uninit+0x94/0x170 [dc395x]
    [    1.260307] Call Trace:
    [    1.260442]  dc395x_init_one.cold+0x72a/0x9bb [dc395x]
    
    Link: https://lore.kernel.org/r/20210907040702.1846409-1-ztong0001@xxxxxxxxx
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Reviewed-by: Finn Thain <fthain@xxxxxxxxxxxxxx>
    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/dc395x.c b/drivers/scsi/dc395x.c
index 830b2d2dcf206..8490d0ff04ca7 100644
--- a/drivers/scsi/dc395x.c
+++ b/drivers/scsi/dc395x.c
@@ -4809,6 +4809,7 @@ static int dc395x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	/* initialise the adapter and everything we need */
  	if (adapter_init(acb, io_port_base, io_port_len, irq)) {
 		dprintkl(KERN_INFO, "adapter init failed\n");
+		acb = NULL;
 		goto fail;
 	}
 



[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