Commit f63587cb authored by Parav Pandit's avatar Parav Pandit Committed by Greg Kroah-Hartman

RDMA/core: Follow correct unregister order between sysfs and cgroup

[ Upstream commit c715a395 ]

During register_device() init sequence is,
(a) register with rdma cgroup followed by
(b) register with sysfs

Therefore, unregister_device() sequence should follow the reverse order.
Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
Reviewed-by: default avatarDaniel Jurgens <danielj@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6b827d38
......@@ -599,8 +599,8 @@ void ib_unregister_device(struct ib_device *device)
}
up_read(&lists_rwsem);
ib_device_unregister_rdmacg(device);
ib_device_unregister_sysfs(device);
ib_device_unregister_rdmacg(device);
mutex_unlock(&device_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment