IB/cm: Store and restore ah_attr during CM message processing
authorParav Pandit <parav@mellanox.com>
Mon, 14 May 2018 08:11:09 +0000 (11:11 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 16 May 2018 20:11:46 +0000 (14:11 -0600)
commite822ff213fe60dc539a7e2137a08b04004f8ec25
tree11742b699931a9832cbb896dc1a67f892b2758b9
parent0e225dcb7681c0a8e52fb9dc68bd8ab973de4ca2
IB/cm: Store and restore ah_attr during CM message processing

During CM request processing flow, ah_attr is initialized twice.
First based on wc. Secondly based on primary path record.
ah_attr initialization from path record can fail, which leads to ah_attr
zeroed out.

Therefore, always initialize ah_attr on stack during reinitialization
phase. If ah_attr init is successful, use the new ah_attry by
overwriting the old one. If the ah_attr init fails, continue to use the
last ah_attr.

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