Showing error 1795

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


Source:

 712                PDBG("abort delivered ep %p cm_id %p tid %d\n", ep,
 713                     ep->com.cm_id, ep->hwtid);
 714                ep->com.cm_id->event_handler(ep->com.cm_id, &event);
 715                ep->com.cm_id->rem_ref(ep->com.cm_id);
 716                ep->com.cm_id = NULL;
 717                ep->com.qp = NULL;
 718        }
 719}
 720
 721static void connect_reply_upcall(struct iwch_ep *ep, int status)
 722{
 723        struct iw_cm_event event;
 724
 725        PDBG("%s ep %p status %d\n", __func__, ep, status);
 726        memset(&event, 0, sizeof(event));
 727        event.event = IW_CM_EVENT_CONNECT_REPLY;
 728        event.status = status;
 729        event.local_addr = ep->com.local_addr;
 730        event.remote_addr = ep->com.remote_addr;
 731
 732        if ((status == 0) || (status == -ECONNREFUSED)) {
 733                event.private_data_len = ep->plen;
 734                event.private_data = ep->mpa_pkt + sizeof(struct mpa_message);
 735        }
 736        if (ep->com.cm_id) {
 737                PDBG("%s ep %p tid %d status %d\n", __func__, ep,
 738                     ep->hwtid, status);
 739                ep->com.cm_id->event_handler(ep->com.cm_id, &event);
 740        }
 741        if (status < 0) {
 742                ep->com.cm_id->rem_ref(ep->com.cm_id);
 743                ep->com.cm_id = NULL;
 744                ep->com.qp = NULL;
 745        }
 746}
 747
 748static void connect_request_upcall(struct iwch_ep *ep)
 749{
 750        struct iw_cm_event event;
 751
 752        PDBG("%s ep %p tid %d\n", __func__, ep, ep->hwtid);
Show full sources