]> err.no Git - linux-2.6/commit
IPoIB/cm: Don't crash if remote side uses one QP for both directions
authorMichael S. Tsirkin <mst@dev.mellanox.co.il>
Wed, 2 May 2007 12:31:12 +0000 (15:31 +0300)
committerRoland Dreier <rolandd@cisco.com>
Mon, 7 May 2007 04:18:11 +0000 (21:18 -0700)
commitd6ef7d68f6f51c5b9de01c542dab8b90067a9c27
tree9121e758ef948defe37c7d960bcc422fe37aea0f
parentaff9e39d97585486764572ab2f3bf5dfce18c660
IPoIB/cm: Don't crash if remote side uses one QP for both directions

The IPoIB CM spec allows the use of a single connection in both
active->passive and passive->active directions.  The current Linux
code uses one connection for both directions, but if another node only
uses one connection for both directions, we oops when we try to look
up the passive connection.  Fix by checking that qp_context is
non-NULL before dereferencing it.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
drivers/infiniband/ulp/ipoib/ipoib_cm.c