• Bryan O'Sullivan's avatar
    IB/ipath: fix null deref during rdma ops · 39770264
    Bryan O'Sullivan authored
    The problem was that node A's sending thread, which handles sending RDMA
    read response data, would write the trigger word, the last packet would
    be sent, node B would send a new RDMA read request, node A's interrupt
    handler would initialize s_rdma_sge, then node A's sending thread would
    update s_rdma_sge.  This didn't happen very often naturally but was more
    frequent with 1 byte RDMA reads.  Rather than adding more locking or
    increasing the QP structure size and copying sge data, I modified the
    copy routine to update the pointers before writing the trigger word to
    avoid the update race.
    Signed-off-by: default avatarRalph Campbell <ralphc@pathscale.com>
    Signed-off-by: default avatarBryan O'Sullivan <bos@pathscale.com>
    Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>