diff options
author | Selvin Xavier <selvin.xavier@avagotech.com> | 2015-10-20 14:17:57 +0530 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-10-21 17:28:19 -0400 |
commit | fb16d8c49e6fa2791620cf2cd61d6daa123ed51e (patch) | |
tree | 469200731449a7f4a25e9c6bb3bbfbc91759bab6 /drivers/infiniband/hw/ocrdma/ocrdma_stats.c | |
parent | 5a85f5e9d41bfd8a1fb5136d5ea2815fc75a5271 (diff) |
RDMA/ocrdma: Avoid a possible crash in ocrdma_rem_port_stats
debugfs_remove should be called before freeing the driver
stats resources to avoid any crash during ocrdma_remove.
Signed-off-by: Devesh Sharma <devesh.sharma@avagotech.com>
Signed-off-by: Selvin Xavier <selvin.xavier@avagotech.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma/ocrdma_stats.c')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c index 69334e214571..86c303a620c1 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c @@ -855,9 +855,9 @@ void ocrdma_rem_port_stats(struct ocrdma_dev *dev) { if (!dev->dir) return; + debugfs_remove(dev->dir); mutex_destroy(&dev->stats_lock); ocrdma_release_stats_mem(dev); - debugfs_remove(dev->dir); } void ocrdma_init_debugfs(void) |