summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_3ad.h
diff options
context:
space:
mode:
authornikolay@redhat.com <nikolay@redhat.com>2013-05-18 01:18:31 +0000
committerDavid S. Miller <davem@davemloft.net>2013-05-19 23:25:49 -0700
commit318debd897735fe834545b6f3d2e96bcc9210b9f (patch)
tree26c391376d3ee7b7f1d58819f320b31a7dfaf016 /drivers/net/bonding/bond_3ad.h
parent5a5c5fd48e3bcd57572e9a7a4964ed8f38a20b87 (diff)
downloadblackbird-op-linux-318debd897735fe834545b6f3d2e96bcc9210b9f.tar.gz
blackbird-op-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_3ad.h')
-rw-r--r--drivers/net/bonding/bond_3ad.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
index 0cfaa4afdece..5d91ad0cc041 100644
--- a/drivers/net/bonding/bond_3ad.h
+++ b/drivers/net/bonding/bond_3ad.h
@@ -273,6 +273,8 @@ void bond_3ad_adapter_speed_changed(struct slave *slave);
void bond_3ad_adapter_duplex_changed(struct slave *slave);
void bond_3ad_handle_link_change(struct slave *slave, char link);
int bond_3ad_get_active_agg_info(struct bonding *bond, struct ad_info *ad_info);
+int __bond_3ad_get_active_agg_info(struct bonding *bond,
+ struct ad_info *ad_info);
int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev);
int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond,
struct slave *slave);
OpenPOWER on IntegriCloud