Skip to content

Commit

Permalink
bonding: uninitialized variable in bond_miimon_inspect()
Browse files Browse the repository at this point in the history
[ Upstream commit e5214f3 ]

The "ignore_updelay" variable needs to be initialized to false.

Fixes: f8a65ab ("bonding: fix link recovery in mode 2 when updelay is nonzero")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Link: https://lore.kernel.org/r/Y4SWJlh3ohJ6EPTL@kili
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
error27 authored and gregkh committed Dec 31, 2022
1 parent 26a844a commit 58cf9f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2531,10 +2531,10 @@ static int bond_slave_info_query(struct net_device *bond_dev, struct ifslave *in
/* called with rcu_read_lock() */
static int bond_miimon_inspect(struct bonding *bond)
{
bool ignore_updelay = false;
int link_state, commit = 0;
struct list_head *iter;
struct slave *slave;
bool ignore_updelay;

if (BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP) {
ignore_updelay = !rcu_dereference(bond->curr_active_slave);
Expand Down

0 comments on commit 58cf9f4

Please sign in to comment.