diff options
author | Mark Zhang <markzhang@nvidia.com> | 2021-06-02 13:27:08 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-06-02 15:41:58 -0300 |
commit | 76039ac9095f5ee5ec7fb95ccb6a5460d5f8c3a2 (patch) | |
tree | dd9b0fca05125e53bb0c7eab30ce7eb344f89150 /drivers/infiniband/hw/i40iw/i40iw_main.c | |
parent | 7345201c39633fc4c82dae7315da7154efaf2459 (diff) |
IB/cm: Protect cm_dev, cm_ports and mad_agent with kref and lock
During cm_dev deregistration in cm_remove_one(), the cm_device and
cm_ports will be freed, after that they should not be accessed. The
mad_agent needs to be protected as well.
This patch adds a cm_device kref to protect cm_dev and cm_ports, and a
mad_agent_lock spinlock to protect mad_agent.
Link: https://lore.kernel.org/r/501ba7a2ff203dccd0e6755d3f93329772adce52.1622629024.git.leonro@nvidia.com
Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/i40iw/i40iw_main.c')
0 files changed, 0 insertions, 0 deletions