net/mlx5: Avoid double free of root ns in the error flow path
Parav Pandit authored
When root ns setup for rdma, sniffer tx and sniffer rx fails,
such root ns cleanup is done by the error unwinding path of
mlx5_cleanup_fs().
Below call graph shows an example for sniffer_rx_root_ns.

mlx5_init_fs()
  init_sniffer_rx_root_ns()
    cleanup_root_ns(steering->sniffer_rx_root_ns);
mlx5_cleanup_fs()
  cleanup_root_ns(steering->sniffer_rx_root_ns);
  /* double free of sniffer_rx_root_ns */

Hence, use the existing cleanup_fs to cleanup.

Fixes: d83eb50e ("net/mlx5: Add support in RDMA RX steering")
Fixes: 87d22483

 ("net/mlx5: Add sniffer namespaces")
Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
905f6bd3
Name Last commit Last update
Documentation Documentation: net-sysfs: Remove duplicate PHY device documentation
LICENSES LICENSES: Rename other to deprecated
arch Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
block Merge tag 'for-5.2/block-post-20190516' of git://git.kernel.dk/linux-block
certs kexec, KEYS: Make use of platform keyring for signature verify
crypto Merge tag 'spdx-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
drivers net/mlx5: Avoid double free of root ns in the error flow path
fs Merge tag 'gfs2-5.1.fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2
include net: ethtool: Document get_rxfh_context and set_rxfh_context ethtool ops
init treewide: Add SPDX license identifier - Makefile/Kconfig
ipc ipc: do cyclic id allocation for the ipc object.
kernel Merge tag 'spdx-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
lib Merge tag 'spdx-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
mm treewide: Add SPDX license identifier - Makefile/Kconfig
net llc: fix skb leak in llc_build_and_send_ui_pkt()
samples treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13
scripts Merge tag 'spdx-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
security Merge tag 'selinux-pr-20190521' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux
sound treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13
tools selftests: pmtu: Fix encapsulating device in pmtu_vti6_link_change_mtu
usr user/Makefile: Fix typo and capitalization in comment section
virt treewide: Add SPDX license identifier - Makefile/Kconfig
.clang-format Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.