Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Browse files Browse the repository at this point in the history
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] gdth: fix oops in gdth_copy_cmd()
  [SCSI] mptsas: Fix oops for insmod during kexec
  [SCSI] lpfc: avoid double-free during PCI error failure
  • Loading branch information
Linus Torvalds committed Mar 27, 2007
2 parents d0d87aa + bb9ba31 commit d459094
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions drivers/message/fusion/mptsas.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
static int
mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
{
MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
MPT_SCSI_HOST *hd;
struct mptsas_target_reset_event *target_reset_list, *n;
int rc;

Expand All @@ -827,7 +827,10 @@ mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
if (reset_phase != MPT_IOC_POST_RESET)
goto out;

if (!hd || !hd->ioc)
if (!ioc->sh || !ioc->sh->hostdata)
goto out;
hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
if (!hd->ioc)
goto out;

if (list_empty(&hd->target_reset_list))
Expand Down
2 changes: 2 additions & 0 deletions drivers/scsi/gdth.c
Original file line number Diff line number Diff line change
Expand Up @@ -3091,6 +3091,7 @@ static int gdth_fill_raw_cmd(int hanum,Scsi_Cmnd *scp,unchar b)
cmdp->u.raw64.direction =
gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN;
memcpy(cmdp->u.raw64.cmd,scp->cmnd,16);
cmdp->u.raw64.sg_ranz = 0;
} else {
cmdp->u.raw.reserved = 0;
cmdp->u.raw.mdisc_time = 0;
Expand All @@ -3107,6 +3108,7 @@ static int gdth_fill_raw_cmd(int hanum,Scsi_Cmnd *scp,unchar b)
cmdp->u.raw.direction =
gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN;
memcpy(cmdp->u.raw.cmd,scp->cmnd,12);
cmdp->u.raw.sg_ranz = 0;
}

if (scp->use_sg) {
Expand Down
5 changes: 2 additions & 3 deletions drivers/scsi/lpfc/lpfc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1817,10 +1817,9 @@ static pci_ers_result_t lpfc_io_error_detected(struct pci_dev *pdev,
struct lpfc_sli *psli = &phba->sli;
struct lpfc_sli_ring *pring;

if (state == pci_channel_io_perm_failure) {
lpfc_pci_remove_one(pdev);
if (state == pci_channel_io_perm_failure)
return PCI_ERS_RESULT_DISCONNECT;
}

pci_disable_device(pdev);
/*
* There may be I/Os dropped by the firmware.
Expand Down

0 comments on commit d459094

Please sign in to comment.