public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [net 1/7] net/mlx5: Bridge, fix uninitialized variable usage
       [not found] <20210907212420.28529-1-saeed@kernel.org>
@ 2021-09-07 21:24 ` Saeed Mahameed
  2021-09-08 10:50   ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Saeed Mahameed @ 2021-09-07 21:24 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski
  Cc: netdev, Vlad Buslov, Colin King, Tim Gardner, Naresh Kamboju,
	linux-kernel, Saeed Mahameed

From: Vlad Buslov <vladbu@nvidia.com>

In some conditions variable 'err' is not assigned with value in
mlx5_esw_bridge_port_obj_attr_set() and mlx5_esw_bridge_port_changeupper()
functions after recent changes to support LAG. Initialize the variable with
zero value in both cases.

Reported-by: Colin King <colin.king@canonical.com>
Reported-by: Tim Gardner <tim.gardner@canonical.com>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
CC: linux-kernel@vger.kernel.org
Fixes: ff9b7521468b ("net/mlx5: Bridge, support LAG")
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c b/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c
index 0c38c2e319be..b5ddaa82755f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c
@@ -137,7 +137,7 @@ static int mlx5_esw_bridge_port_changeupper(struct notifier_block *nb, void *ptr
 	u16 vport_num, esw_owner_vhca_id;
 	struct netlink_ext_ack *extack;
 	int ifindex = upper->ifindex;
-	int err;
+	int err = 0;
 
 	if (!netif_is_bridge_master(upper))
 		return 0;
@@ -244,7 +244,7 @@ mlx5_esw_bridge_port_obj_attr_set(struct net_device *dev,
 	struct netlink_ext_ack *extack = switchdev_notifier_info_to_extack(&port_attr_info->info);
 	const struct switchdev_attr *attr = port_attr_info->attr;
 	u16 vport_num, esw_owner_vhca_id;
-	int err;
+	int err = 0;
 
 	if (!mlx5_esw_bridge_lower_rep_vport_num_vhca_id_get(dev, br_offloads->esw, &vport_num,
 							     &esw_owner_vhca_id))
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [net 1/7] net/mlx5: Bridge, fix uninitialized variable usage
  2021-09-07 21:24 ` [net 1/7] net/mlx5: Bridge, fix uninitialized variable usage Saeed Mahameed
@ 2021-09-08 10:50   ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-09-08 10:50 UTC (permalink / raw)
  To: Saeed Mahameed
  Cc: davem, kuba, netdev, vladbu, colin.king, tim.gardner,
	naresh.kamboju, linux-kernel, saeedm

Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Tue,  7 Sep 2021 14:24:14 -0700 you wrote:
> From: Vlad Buslov <vladbu@nvidia.com>
> 
> In some conditions variable 'err' is not assigned with value in
> mlx5_esw_bridge_port_obj_attr_set() and mlx5_esw_bridge_port_changeupper()
> functions after recent changes to support LAG. Initialize the variable with
> zero value in both cases.
> 
> [...]

Here is the summary with links:
  - [net,1/7] net/mlx5: Bridge, fix uninitialized variable usage
    https://git.kernel.org/netdev/net/c/8343268ec3cf
  - [net,2/7] net/mlx5: Fix rdma aux device on devlink reload
    https://git.kernel.org/netdev/net/c/897ae4b40e80
  - [net,3/7] net/mlx5: Lag, don't update lag if lag isn't supported
    https://git.kernel.org/netdev/net/c/da8252d5805d
  - [net,4/7] net/mlx5: FWTrace, cancel work on alloc pd error flow
    https://git.kernel.org/netdev/net/c/dfe6fd72b5f1
  - [net,5/7] net/mlx5: Fix potential sleeping in atomic context
    https://git.kernel.org/netdev/net/c/ee27e330a953
  - [net,6/7] net/mlx5e: Fix mutual exclusion between CQE compression and HW TS
    https://git.kernel.org/netdev/net/c/c91c1da72b47
  - [net,7/7] net/mlx5e: Fix condition when retrieving PTP-rqn
    https://git.kernel.org/netdev/net/c/8db6a54f3cae

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-08 10:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20210907212420.28529-1-saeed@kernel.org>
2021-09-07 21:24 ` [net 1/7] net/mlx5: Bridge, fix uninitialized variable usage Saeed Mahameed
2021-09-08 10:50   ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox