Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/bonding: fix array overflow in Rx burst
[ upstream commit 007c5450dfa094f7e07ebee3610bcb3494ef842c ] In bond_ethdev_rx_burst() function, we check the validity of the 'active_slave' as this code: if (++active_slave == slave_count) active_slave = 0; However, the value of 'active_slave' maybe equal to 'slave_count', when a slave is down. This is wrong and it can cause buffer overflow. This patch fixes the issue by using '>=' instead of '=='. Fixes: e1110e9 ("net/bonding: fix Rx slave fairness") Signed-off-by: Lei Ji <jilei8@huawei.com> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> Acked-by: Min Hu (Connor) <humin29@huawei.com>
- Loading branch information