]> git.baikalelectronics.ru Git - kernel.git/commit
IB/ipoib: Add missing locking when CM object is deleted
authorShlomo Pongratz <shlomop@mellanox.com>
Mon, 13 Aug 2012 14:39:49 +0000 (14:39 +0000)
committerRoland Dreier <roland@purestorage.com>
Tue, 14 Aug 2012 22:21:44 +0000 (15:21 -0700)
commit4ddf4a5b2c2c56d1924d0aa28a8bb3f6ce90fb09
tree73d9e6edccbb22680fd0a11e42aa13ff5df7c4f7
parentdde762d5e7a1fb234d670e75ab8ffe3b4780e644
IB/ipoib: Add missing locking when CM object is deleted

Commit 6644dc855321 ("IPoIB: Use a private hash table for path lookup
in xmit path") introduced a bug where in ipoib_cm_destroy_tx() a CM
object is moved between lists without any supported locking.  Under a
stress test, this eventually leads to list corruption and a crash.

Previously when this routine was called, callers were taking the
device priv lock.  Currently this function is called from the RCU
callback associated with neighbour deletion.  Fix the race by taking
the same lock we used to before.

Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/ipoib/ipoib_cm.c