]> git.baikalelectronics.ru Git - kernel.git/commit
IB/cm: Avoid AV ah_attr overwriting during LAP message handling
authorParav Pandit <parav@mellanox.com>
Mon, 14 May 2018 08:11:07 +0000 (11:11 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 16 May 2018 20:11:46 +0000 (14:11 -0600)
commitb1fb13b7c78a979222b32f0ddc1fcb2d8704d364
tree1d64b3c5249c514fbb0596ea47660cd255a730c2
parent080b94d0702d834ea6640d346e3a714a771293a0
IB/cm: Avoid AV ah_attr overwriting during LAP message handling

AH attribute of the cm_id can be overwritten if LAP message is received
on CM request which is in progress. This bug got introduced to avoid
sleeping when spin lock is held as part of commit in Fixes tag.

Therefore validate the cm_id state first and continue to perform AV
ah_attr initialization.

Given that Aleternative path related messages are not supported for
RoCE, init_av_from_response/path is such messages are ok to be called
from blocking context.

Fixes: aca65718e510 ("IB/cm: Fix sleeping while spin lock is held")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cm.c