[bug report] scsi: mpt3sas: Reload SBR without rebooting HBA

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

 



Hello Ranjan Kumar,

Commit c0767560b012 ("scsi: mpt3sas: Reload SBR without rebooting
HBA") from Dec 28, 2023 (linux-next), leads to the following Smatch
static checker warning:

	drivers/scsi/mpt3sas/mpt3sas_base.c:8083 _base_diag_reset()
	warn: double unlock '&ioc->hostdiag_unlock_mutex' (orig line 8065)

drivers/scsi/mpt3sas/mpt3sas_base.c
  8061          writel(host_diagnostic & ~MPI2_DIAG_HOLD_IOC_RESET,
  8062              &ioc->chip->HostDiagnostic);
  8063  
  8064          mpt3sas_base_lock_host_diagnostic(ioc);
  8065          mutex_unlock(&ioc->hostdiag_unlock_mutex);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  8066  
  8067          drsprintk(ioc, ioc_info(ioc, "Wait for FW to go to the READY state\n"));
  8068          ioc_state = _base_wait_on_iocstate(ioc, MPI2_IOC_STATE_READY, 20);
  8069          if (ioc_state) {
  8070                  ioc_err(ioc, "%s: failed going to ready state (ioc_state=0x%x)\n",
  8071                          __func__, ioc_state);
  8072                  _base_dump_reg_set(ioc);
  8073                  goto out;
                        ^^^^^^^^

  8074          }
  8075  
  8076          pci_cfg_access_unlock(ioc->pdev);
  8077          ioc_info(ioc, "diag reset: SUCCESS\n");
  8078          return 0;
  8079  
  8080   out:
  8081          pci_cfg_access_unlock(ioc->pdev);
  8082          ioc_err(ioc, "diag reset: FAILED\n");
  8083          mutex_unlock(&ioc->hostdiag_unlock_mutex);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Double unlock.

  8084          return -EFAULT;
  8085  }


regards,
dan carpenter




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux