I guess this is slightly more correct. There is still a race here though.
After you make your copy of active_slave_count, the number of active
slaves could go to 0 and the memcpy() would copy an invalid element,
acitve_slaves[0]. There is no simple fix to this problem. Your patch
reduces the opp
1. when memcpy slaves the internals->active_slave_count 1
2. return internals->active_slave_count is 2
3. the slaves[1] would be a random invalid value
Signed-off-by: Haifeng Lin
---
drivers/net/bonding/rte_eth_bond_api.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
1. when memcpy slaves the internals->active_slave_count 1
2. return internals->active_slave_count is 2
3. the slaves[1] would be a random invalid value
---
drivers/net/bonding/rte_eth_bond_api.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bonding/rte_eth
3 matches
Mail list logo