]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: fix multiple 3ad mode sysfs race conditions
authornikolay@redhat.com <nikolay@redhat.com>
Sat, 18 May 2013 01:18:31 +0000 (01:18 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 May 2013 06:25:49 +0000 (23:25 -0700)
commit171c17e3c4e803e658f9e41dbda381c40e961ca9
tree26c391376d3ee7b7f1d58819f320b31a7dfaf016
parenta4b40a1d0a5b1e113c188d79c269b6b06acb1ca7
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>
drivers/net/bonding/bond_3ad.c
drivers/net/bonding/bond_3ad.h
drivers/net/bonding/bond_procfs.c
drivers/net/bonding/bond_sysfs.c