diff options
author | Xiaomeng Tong <[email protected]> | 2022-05-10 13:48:46 -0700 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2022-05-11 15:19:28 -0700 |
commit | 3f95a7472d14abef284d8968734fe2ae7ff4845f (patch) | |
tree | 7591c2ad116993ed37a3ce83a99f6fbbc5bde140 /tools/perf/scripts/python/mem-phys-addr.py | |
parent | 8b796475fd7882663a870456466a4fb315cc1bd6 (diff) |
i40e: i40e_main: fix a missing check on list iterator
The bug is here:
ret = i40e_add_macvlan_filter(hw, ch->seid, vdev->dev_addr, &aq_err);
The list iterator 'ch' will point to a bogus position containing
HEAD if the list is empty or no element is found. This case must
be checked before any use of the iterator, otherwise it will
lead to a invalid memory access.
To fix this bug, use a new variable 'iter' as the list iterator,
while use the origin variable 'ch' as a dedicated pointer to
point to the found element.
Cc: [email protected]
Fixes: 1d8d80b4e4ff6 ("i40e: Add macvlan support on i40e")
Signed-off-by: Xiaomeng Tong <[email protected]>
Tested-by: Gurucharan <[email protected]> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions