RDMA/mlx5: Cancel pkey work before destroying device resources
authorLeon Romanovsky <leonro@nvidia.com>
Fri, 23 Jul 2021 11:39:46 +0000 (14:39 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 3 Aug 2021 16:44:26 +0000 (13:44 -0300)
commitb0791dbf1214a9e539fa8507b4b7e50f5367b79a
treee001bb160a12f2cc54358066961eddd3a912db41
parentf9193d266347fe9bed5c173e7a1bf96268142a79
RDMA/mlx5: Cancel pkey work before destroying device resources

In the driver release flow, we are ensuring that notifier is disabled and
no new works can be added to pkey_change_handler. It means that we can
cancel that handler before destroying resources to make sure that our
unwind routine is symmetrical to the allocation one.

Link: https://lore.kernel.org/r/f2b1ea1bad952e4e7a48a6f731de9e0344986b29.1627040189.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/main.c