Revert "net/mlx5: Annotate mutex destroy for root ns"
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Jun 2020 17:29:42 +0000 (19:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jun 2020 18:22:53 +0000 (20:22 +0200)
commit5c940043ffe8a27c2e8af078cdfea79b38e46752
tree7158829eef60b8feaae2029daee29519c06b7fae
parent0fef65e2880f3cf8d979427189ae290da7e1f801
Revert "net/mlx5: Annotate mutex destroy for root ns"

This reverts commit 9b035b08e7e5fe7b2e75636324edf41ee30c5f94 which is
commit 9ca415399dae133b00273a4283ef31d003a6818d upstream.

It was backported incorrectly, Paul writes at:
https://lore.kernel.org/r/20200607203425.GD23662@windriver.com

I happened to notice this commit:

9ca415399dae - "net/mlx5: Annotate mutex destroy for root ns"

...was backported to 4.19 and 5.4 and v5.6 in linux-stable.

It patches del_sw_root_ns() - which only exists after v5.7-rc7 from:

6eb7a268a99b - "net/mlx5: Don't maintain a case of del_sw_func being
null"

which creates the one line del_sw_root_ns stub function around
kfree(node) by breaking it out of tree_put_node().

In the absense of del_sw_root_ns - the backport finds an identical one
line kfree stub fcn - named del_sw_prio from this earlier commit:

139ed6c6c46a - "net/mlx5: Fix steering memory leak"  [in v4.15-rc5]

and then puts the mutex_destroy() into that (wrong) function, instead of
putting it into tree_put_node where the root ns case used to be hand

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Roi Dayan <roid@mellanox.com>
Cc: Mark Bloch <markb@mellanox.com>
Cc: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c