Commit b4aafe77 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fix from James Bottomley:
 "One small fix for a regression in a prior fix (again).

  This time the condition in the prior fix BUG_ON proved to be wrong
  under certain circumstances causing a BUG to trigger where it
  shouldn't in the lpfc driver"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: lpfc: fix oops/BUG in lpfc_sli_ringtxcmpl_put()
parents 318c8932 ff682a3d
...@@ -1323,18 +1323,20 @@ lpfc_sli_ringtxcmpl_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, ...@@ -1323,18 +1323,20 @@ lpfc_sli_ringtxcmpl_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
{ {
lockdep_assert_held(&phba->hbalock); lockdep_assert_held(&phba->hbalock);
BUG_ON(!piocb || !piocb->vport); BUG_ON(!piocb);
list_add_tail(&piocb->list, &pring->txcmplq); list_add_tail(&piocb->list, &pring->txcmplq);
piocb->iocb_flag |= LPFC_IO_ON_TXCMPLQ; piocb->iocb_flag |= LPFC_IO_ON_TXCMPLQ;
if ((unlikely(pring->ringno == LPFC_ELS_RING)) && if ((unlikely(pring->ringno == LPFC_ELS_RING)) &&
(piocb->iocb.ulpCommand != CMD_ABORT_XRI_CN) && (piocb->iocb.ulpCommand != CMD_ABORT_XRI_CN) &&
(piocb->iocb.ulpCommand != CMD_CLOSE_XRI_CN) && (piocb->iocb.ulpCommand != CMD_CLOSE_XRI_CN)) {
(!(piocb->vport->load_flag & FC_UNLOADING))) BUG_ON(!piocb->vport);
mod_timer(&piocb->vport->els_tmofunc, if (!(piocb->vport->load_flag & FC_UNLOADING))
jiffies + mod_timer(&piocb->vport->els_tmofunc,
msecs_to_jiffies(1000 * (phba->fc_ratov << 1))); jiffies +
msecs_to_jiffies(1000 * (phba->fc_ratov << 1)));
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment