Commit fb16d8c4 authored by Selvin Xavier's avatar Selvin Xavier Committed by Doug Ledford

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: default avatarDevesh Sharma <devesh.sharma@avagotech.com>
Signed-off-by: default avatarSelvin Xavier <selvin.xavier@avagotech.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 5a85f5e9
...@@ -855,9 +855,9 @@ void ocrdma_rem_port_stats(struct ocrdma_dev *dev) ...@@ -855,9 +855,9 @@ void ocrdma_rem_port_stats(struct ocrdma_dev *dev)
{ {
if (!dev->dir) if (!dev->dir)
return; return;
debugfs_remove(dev->dir);
mutex_destroy(&dev->stats_lock); mutex_destroy(&dev->stats_lock);
ocrdma_release_stats_mem(dev); ocrdma_release_stats_mem(dev);
debugfs_remove(dev->dir);
} }
void ocrdma_init_debugfs(void) void ocrdma_init_debugfs(void)
......
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