]> git.baikalelectronics.ru Git - kernel.git/commit
IPoIB/cm: Fix error handling in ipoib_cm_dev_open()
authorMichael S. Tsirkin <mst@dev.mellanox.co.il>
Tue, 1 May 2007 00:30:28 +0000 (17:30 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 1 May 2007 00:30:28 +0000 (17:30 -0700)
commit958138f78a7f562489c7ae485bc5d2f5c035e3df
tree370b7f5f3d0bdb8d344dadbffce4ec4eba0af4a7
parent14e5220336d49e0fc9b7b40d93dd229993b6560c
IPoIB/cm: Fix error handling in ipoib_cm_dev_open()

If skb allocation fails when we start the device, we call
ipoib_cm_dev_stop() even though ipoib_cm_dev_open() did not run to
completion, so we pass an invalid pointer to ib_destroy_cm_id and get
an oops.

Fix by clearing cm.id on error, and testing it in cm_dev_stop().
This fixes <https://bugs.openfabrics.org/show_bug.cgi?id=561>

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