summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-09-06 10:55:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-20 18:46:03 +0100
commitf63587cbb091e929f8651449540cf35be87ae2a2 (patch)
treeb18f8d83684ae8290bddbf01ae87af2931855785 /drivers/infiniband/core
parent6b827d38cead1417fda38f180e56ac70ef21f285 (diff)
downloadlinux-f63587cbb091e929f8651449540cf35be87ae2a2.tar.gz
linux-f63587cbb091e929f8651449540cf35be87ae2a2.tar.bz2
linux-f63587cbb091e929f8651449540cf35be87ae2a2.zip
RDMA/core: Follow correct unregister order between sysfs and cgroup
[ Upstream commit c715a39541bb399eb03d728a996b224d90ce1336 ] 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: Parav Pandit <parav@mellanox.com> Reviewed-by: Daniel Jurgens <danielj@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r--drivers/infiniband/core/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 6d8ac51a39cc..6a585c3e2192 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -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);