lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160713100825.GD29468@mwanda>
Date:	Wed, 13 Jul 2016 14:48:44 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Matan Barak <matanb@...lanox.com>,
	Or Gerlitz <ogerlitz@...lanox.com>
Cc:	Leon Romanovsky <leonro@...lanox.com>, netdev@...r.kernel.org,
	linux-rdma@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch v2] net/mlx5: missing error code in
 esw_create_offloads_fdb_table()

We accidentally return success when we had intended to return an error
code.

Fixes: 69697b6e2086 ('net/mlx5: E-Switch, Add support for the sriov offloads mode')
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
v2: return -ENOTSUPP instead --EINVAL

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index 1842dfb..7d982cf 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -183,6 +183,7 @@ static int esw_create_offloads_fdb_table(struct mlx5_eswitch *esw, int nvports)
 
 	root_ns = mlx5_get_flow_namespace(dev, MLX5_FLOW_NAMESPACE_FDB);
 	if (!root_ns) {
+		err = -ENOTSUPP;
 		esw_warn(dev, "Failed to get FDB flow namespace\n");
 		goto ns_err;
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ