You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
Doug Ledford
parent
5a85f5e9d4
commit
fb16d8c49e
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user