Showing error 763

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: drivers/scsi/iscsi_tcp.c
Line in file: 765
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:22:22 UTC


Source:

 735        }
 736
 737        /* Additional header segments. So far, we don't
 738         * process additional headers.
 739         */
 740        ahslen = hdr->hlength << 2;
 741
 742        opcode = hdr->opcode & ISCSI_OPCODE_MASK;
 743        /* verify itt (itt encoding: age+cid+itt) */
 744        rc = iscsi_verify_itt(conn, hdr->itt);
 745        if (rc)
 746                return rc;
 747
 748        debug_tcp("opcode 0x%x ahslen %d datalen %d\n",
 749                  opcode, ahslen, tcp_conn->in.datalen);
 750
 751        switch(opcode) {
 752        case ISCSI_OP_SCSI_DATA_IN:
 753                spin_lock(&conn->session->lock);
 754                task = iscsi_itt_to_ctask(conn, hdr->itt);
 755                if (!task)
 756                        rc = ISCSI_ERR_BAD_ITT;
 757                else
 758                        rc = iscsi_data_in(conn, task);
 759                if (rc) {
 760                        spin_unlock(&conn->session->lock);
 761                        break;
 762                }
 763
 764                if (tcp_conn->in.datalen) {
 765                        struct iscsi_tcp_task *tcp_task = task->dd_data;
 766                        struct hash_desc *rx_hash = NULL;
 767                        struct scsi_data_buffer *sdb = scsi_in(task->sc);
 768
 769                        /*
 770                         * Setup copy of Data-In into the Scsi_Cmnd
 771                         * Scatterlist case:
 772                         * We set up the iscsi_segment to point to the next
 773                         * scatterlist entry to copy to. As we go along,
 774                         * we move on to the next scatterlist entry and
 775                         * update the digest per-entry.
Show full sources