diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-07-02 15:40:26 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-09-04 09:04:18 +0300 |
commit | 23bb9f692b6679e5e661809b3bc4c1da1e4cb34b (patch) | |
tree | 26fe0fe53ebf76e8b1d918b382708eef98dad178 /tools/perf/scripts/python/syscall-counts.py | |
parent | 67538eb5c00f08d7fe27f1bb703098b17302bdc0 (diff) |
wil6210: fix wil_cid_valid with negative cid values
There are several occasions where a negative cid value is passed
into wil_cid_valid and this is converted into a u8 causing the
range check of cid >= 0 to always succeed. Fix this by making
the cid argument an int to handle any -ve error value of cid.
An example of this behaviour is in wil_cfg80211_dump_station,
where cid is assigned -ENOENT if the call to wil_find_cid_by_idx
fails, and this -ve value is passed to wil_cid_valid. I believe
that the conversion of -ENOENT to the u8 value 254 which is
greater than wil->max_assoc_sta causes wil_find_cid_by_idx to
currently work fine, but I think is by luck and not the
intended behaviour.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions