Re: [PATCH rdma-next v1] RDMA/cma: Protect cma dev list with lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 30, 2018 at 08:35:19AM +0300, Leon Romanovsky wrote:
> From: Parav Pandit <parav@xxxxxxxxxxxx>
> 
> When AF_IB addresses are used during rdma_resolve_addr(), currently lock
> is not held. A cma device can get removed while such list traversal is
> in progress which may lead to crash.
> 
> Therefore, hold a lock while traversing the list which avoids such
> situation.
> 
> This patch doesn't come as an outcome of real crash, but from code review.
> 
> Cc: <stable@xxxxxxxxxxxxxxx> # 3.10
> Fixes: f17df3b0d ("RDMA/cma: Add support for AF_IB to rdma_resolve_addr()")
> Signed-off-by: Parav Pandit <parav@xxxxxxxxxxxx>
> Reviewed-by: Daniel Jurgens <danielj@xxxxxxxxxxxx>
> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx>
> Changelog v0->v1:
>  * Updated commit message to replace "This patch is not tested"
>    sentence, to more adequate variant.
>  drivers/infiniband/core/cma.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)

Applied to for-rc, I revised the commit message to include the ladder
diagram Parav provided.

Thanks,
Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux