Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)