]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: fix debugfs cleanup
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Mon, 18 Sep 2017 11:28:48 +0000 (12:28 +0100)
committerDoug Ledford <dledford@redhat.com>
Fri, 22 Sep 2017 17:17:32 +0000 (13:17 -0400)
commit9c86f1043b0ef6d071728f4eafc9664fd3c60db7
tree2db96c58dc48ba61b77fff25fdbec5998e6e43a0
parentac38f91ea298b57acf52719ceef8bed7d7f88c2e
IB/mlx5: fix debugfs cleanup

If delay_drop_debugfs_init() fails in any of the operations to create
debugfs, it is calling delay_drop_debugfs_cleanup() as part of its
cleanup. But delay_drop_debugfs_cleanup() checks for 'dbg' and since
we have not yet pointed 'dbg' to the debugfs we need to cleanup, the
cleanup fails and we are left with stray debugfs elements and also a
memory leak.

Fixes: 98f7cee60804 ("IB/mlx5: Add necessary delay drop assignment")
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c