]> git.baikalelectronics.ru Git - kernel.git/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)
commitbce4957b234ba8bf20437d5d1a89dc9e4ae461f9
tree9121e758ef948defe37c7d960bcc422fe37aea0f
parentd3a2b83962e5779099e732789644846d8b041176
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