Showing error 1842

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


Source:

3943        if (!scb->scsi_cmd)
3944                /* internal commands are handled in do_ipsintr */
3945                return;
3946
3947        DEBUG_VAR(2, "(%s%d) ips_chkstatus: cmd 0x%X id %d (%d %d %d)",
3948                  ips_name,
3949                  ha->host_num,
3950                  scb->cdb[0],
3951                  scb->cmd.basic_io.command_id,
3952                  scb->bus, scb->target_id, scb->lun);
3953
3954        if ((scb->scsi_cmd) && (ips_is_passthru(scb->scsi_cmd)))
3955                /* passthru - just returns the raw result */
3956                return;
3957
3958        errcode = DID_OK;
3959
3960        if (((basic_status & IPS_GSC_STATUS_MASK) == IPS_CMD_SUCCESS) ||
3961            ((basic_status & IPS_GSC_STATUS_MASK) == IPS_CMD_RECOVERED_ERROR)) {
3962
3963                if (scb->bus == 0) {
3964                        if ((basic_status & IPS_GSC_STATUS_MASK) ==
3965                            IPS_CMD_RECOVERED_ERROR) {
3966                                DEBUG_VAR(1,
3967                                          "(%s%d) Recovered Logical Drive Error OpCode: %x, BSB: %x, ESB: %x",
3968                                          ips_name, ha->host_num,
3969                                          scb->cmd.basic_io.op_code,
3970                                          basic_status, ext_status);
3971                        }
3972
3973                        switch (scb->scsi_cmd->cmnd[0]) {
3974                        case ALLOW_MEDIUM_REMOVAL:
3975                        case REZERO_UNIT:
3976                        case ERASE:
3977                        case WRITE_FILEMARKS:
3978                        case SPACE:
3979                                errcode = DID_ERROR;
3980                                break;
3981
3982                        case START_STOP:
3983                                break;
Show full sources