Showing error 1845

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: drivers/scsi/lpfc/lpfc_sli.c
Line in file: 1659
Project: Linux Kernel
Project version: 2.6.28
Confirmation: Fixed by a257bf905efd22fd2c055580b0ab2e8e7ed1b6a1
Tools: Smatch (1.59)
Entered: 2013-09-11 08:47:26 UTC


Source:

1629                        if (pring->ringno == LPFC_ELS_RING) {
1630                                if (cmdiocbp->iocb_flag & LPFC_DRIVER_ABORTED) {
1631                                        cmdiocbp->iocb_flag &=
1632                                                ~LPFC_DRIVER_ABORTED;
1633                                        saveq->iocb.ulpStatus =
1634                                                IOSTAT_LOCAL_REJECT;
1635                                        saveq->iocb.un.ulpWord[4] =
1636                                                IOERR_SLI_ABORTED;
1637
1638                                        /* Firmware could still be in progress
1639                                         * of DMAing payload, so don't free data
1640                                         * buffer till after a hbeat.
1641                                         */
1642                                        saveq->iocb_flag |= LPFC_DELAY_MEM_FREE;
1643                                }
1644                        }
1645                        (cmdiocbp->iocb_cmpl) (phba, cmdiocbp, saveq);
1646                } else
1647                        lpfc_sli_release_iocbq(phba, cmdiocbp);
1648        } else {
1649                /*
1650                 * Unknown initiating command based on the response iotag.
1651                 * This could be the case on the ELS ring because of
1652                 * lpfc_els_abort().
1653                 */
1654                if (pring->ringno != LPFC_ELS_RING) {
1655                        /*
1656                         * Ring <ringno> handler: unexpected completion IoTag
1657                         * <IoTag>
1658                         */
1659                        lpfc_printf_vlog(cmdiocbp->vport, KERN_WARNING, LOG_SLI,
1660                                         "0322 Ring %d handler: "
1661                                         "unexpected completion IoTag x%x "
1662                                         "Data: x%x x%x x%x x%x\n",
1663                                         pring->ringno,
1664                                         saveq->iocb.ulpIoTag,
1665                                         saveq->iocb.ulpStatus,
1666                                         saveq->iocb.un.ulpWord[4],
1667                                         saveq->iocb.ulpCommand,
1668                                         saveq->iocb.ulpContext);
1669                }
Show full sources