]> git.baikalelectronics.ru Git - kernel.git/commitdiff
bonding: uninitialized variable in bond_miimon_inspect()
authorDan Carpenter <error27@gmail.com>
Mon, 28 Nov 2022 11:06:14 +0000 (14:06 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:08 +0000 (11:41 +0100)
[ Upstream commit e5214f363dabca240446272dac54d404501ad5e5 ]

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

Fixes: f8a65ab2f3ff ("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>
drivers/net/bonding/bond_main.c

index 0b7994cb938074293d3acf4b60acf8f8e294130a..0885991347d09597b2828aabfabd0cb6d770b426 100644 (file)
@@ -2102,10 +2102,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);