提交 e5214f36 编写于 作者: D Dan Carpenter 提交者: Paolo Abeni

bonding: uninitialized variable in bond_miimon_inspect()

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

Fixes: f8a65ab2 ("bonding: fix link recovery in mode 2 when updelay is nonzero")
Signed-off-by: NDan Carpenter <error27@gmail.com>
Reviewed-by: NPavan Chebbi <pavan.chebbi@broadcom.com>
Acked-by: NJay Vosburgh <jay.vosburgh@canonical.com>
Link: https://lore.kernel.org/r/Y4SWJlh3ohJ6EPTL@kiliSigned-off-by: NPaolo Abeni <pabeni@redhat.com>
上级 46115b27
...@@ -2524,10 +2524,10 @@ static int bond_slave_info_query(struct net_device *bond_dev, struct ifslave *in ...@@ -2524,10 +2524,10 @@ static int bond_slave_info_query(struct net_device *bond_dev, struct ifslave *in
/* called with rcu_read_lock() */ /* called with rcu_read_lock() */
static int bond_miimon_inspect(struct bonding *bond) static int bond_miimon_inspect(struct bonding *bond)
{ {
bool ignore_updelay = false;
int link_state, commit = 0; int link_state, commit = 0;
struct list_head *iter; struct list_head *iter;
struct slave *slave; struct slave *slave;
bool ignore_updelay;
if (BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP) { if (BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP) {
ignore_updelay = !rcu_dereference(bond->curr_active_slave); ignore_updelay = !rcu_dereference(bond->curr_active_slave);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册