diff options
author | Xiaomeng Tong <[email protected]> | 2022-03-28 20:28:20 +0800 |
---|---|---|
committer | Kalle Valo <[email protected]> | 2022-05-02 17:00:46 +0300 |
commit | 54a6f29522da3c914da30e50721dedf51046449a (patch) | |
tree | b4a095ea63bec74f403ff4bc4750fb013c2ec762 /tools/perf/scripts/python/syscall-counts-by-pid.py | |
parent | 3b3299a1080e357c540e968b704f2eeb46a697f7 (diff) |
carl9170: tx: fix an incorrect use of list iterator
If the previous list_for_each_entry_continue_rcu() don't exit early
(no goto hit inside the loop), the iterator 'cvif' after the loop
will be a bogus pointer to an invalid structure object containing
the HEAD (&ar->vif_list). As a result, the use of 'cvif' after that
will lead to a invalid memory access (i.e., 'cvif->id': the invalid
pointer dereference when return back to/after the callsite in the
carl9170_update_beacon()).
The original intention should have been to return the valid 'cvif'
when found in list, NULL otherwise. So just return NULL when no
entry found, to fix this bug.
Cc: [email protected]
Fixes: 1f1d9654e183c ("carl9170: refactor carl9170_update_beacon")
Signed-off-by: Xiaomeng Tong <[email protected]>
Acked-by: Christian Lamparter <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions