]> git.baikalelectronics.ru Git - kernel.git/commit
IPoIB: Fix usage of uninitialized multicast objects
authorErez Shitrit <erezsh@mellanox.com>
Wed, 16 Oct 2013 14:37:51 +0000 (17:37 +0300)
committerRoland Dreier <roland@purestorage.com>
Fri, 8 Nov 2013 22:42:49 +0000 (14:42 -0800)
commitb2f8d4889cfdf2274613b62f752cc0d43bb993f5
tree889eeb5b6597be549fe98f59f6384313b5f4a3e5
parent22b81c2d5204fe1e28390d0c5645f7134cb11f7f
IPoIB: Fix usage of uninitialized multicast objects

The driver should avoid calling ib_sa_free_multicast on the mcast->mc
object until it finishes its initialization state.  Otherwise we can
crash when ipoib_mcast_dev_flush() attempts to use the uninitialized
multicast object.

Instead, only call wait_for_completion() for multicast entries that
started the join process, meaning that ib_sa_join_multicast() finished.

Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/ipoib/ipoib.h
drivers/infiniband/ulp/ipoib/ipoib_multicast.c