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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 12 Jul 2014 10:49:01 +0200 From: Eric Dumazet <eric.dumazet@...il.com> To: Mahesh Bandewar <maheshb@...gle.com> Cc: Jay Vosburgh <j.vosburgh@...il.com>, Veaceslav Falico <vfalico@...hat.com>, Andy Gospodarek <andy@...yhouse.net>, David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>, Eric Dumazet <edumazet@...gle.com>, Maciej Zenczykowski <maze@...gle.com> Subject: Re: [PATCHv2] bonding: Do not try to send packets over dead link in TLB mode. On Fri, 2014-07-11 at 14:10 -0700, Mahesh Bandewar wrote: ... > This patch fixes these issues and distributes flows across the > UP links only. Also the array construction of links which are > capable of sending packets happen in the control path leaving > only link-selection during the data-path. ... > Signed-off-by: Mahesh Bandewar <maheshb@...gle.com> > --- ... > > +static int bond_tlb_update_slave_arr(struct bonding *bond) > +{ > + struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); > + struct slave *tx_slave; > + struct list_head *iter; > + struct tlb_up_slave *new_arr, *old_arr; > + > + new_arr = kzalloc(offsetof(struct tlb_up_slave, arr[bond->slave_cnt]), > + GFP_KERNEL); > + if (!new_arr) > + return -ENOMEM; > + > + bond_for_each_slave(bond, tx_slave, iter) { > + if (bond_slave_can_tx(tx_slave)) > + new_arr->arr[new_arr->count++] = tx_slave; > + } > + > + old_arr = bond_info->slave_arr; Check your patch with : CONFIG_SPARSE_RCU_POINTER=y make C=2 drivers/net/bonding/bond_alb.o Hint : You need here to use old_arr = rtnl_dereference(bond_info->slave_arr); > + rcu_assign_pointer(bond_info->slave_arr, new_arr); > + if (old_arr) > + kfree_rcu(old_arr, rcu); > + > + return 0; > +} > + -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists