summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_procfs.c
diff options
context:
space:
mode:
authornikolay@redhat.com2013-05-18 03:18:31 +0200
committerDavid S. Miller2013-05-20 08:25:49 +0200
commit318debd897735fe834545b6f3d2e96bcc9210b9f (patch)
tree26c391376d3ee7b7f1d58819f320b31a7dfaf016 /drivers/net/bonding/bond_procfs.c
parentbonding: arp_ip_count and arp_targets can be wrong (diff)
downloadkernel-qcow2-linux-318debd897735fe834545b6f3d2e96bcc9210b9f.tar.gz
kernel-qcow2-linux-318debd897735fe834545b6f3d2e96bcc9210b9f.tar.xz
kernel-qcow2-linux-318debd897735fe834545b6f3d2e96bcc9210b9f.zip
bonding: fix multiple 3ad mode sysfs race conditions
When bond_3ad_get_active_agg_info() is used in all show_ad_ functions it is not protected against slave manipulation and since it walks over the slaves and uses them, this can easily result in NULL pointer dereference or use of freed memory. Both the new wrapper and the internal function are exported to the bonding as they're needed in different places. Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_procfs.c')
-rw-r--r--drivers/net/bonding/bond_procfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c
index 94d06f1307b8..4060d41f0ee7 100644
--- a/drivers/net/bonding/bond_procfs.c
+++ b/drivers/net/bonding/bond_procfs.c
@@ -130,7 +130,7 @@ static void bond_info_show_master(struct seq_file *seq)
seq_printf(seq, "Aggregator selection policy (ad_select): %s\n",
ad_select_tbl[bond->params.ad_select].modename);
- if (bond_3ad_get_active_agg_info(bond, &ad_info)) {
+ if (__bond_3ad_get_active_agg_info(bond, &ad_info)) {
seq_printf(seq, "bond %s has no active aggregator\n",
bond->dev->name);
} else {