diff options
author | Johannes Berg <[email protected]> | 2020-11-12 11:22:04 +0100 |
---|---|---|
committer | Johannes Berg <[email protected]> | 2020-11-13 09:48:32 +0100 |
commit | 7bc40aedf24d31d8bea80e1161e996ef4299fb10 (patch) | |
tree | 501ac5636b04187745cc2bd8749332c75f9172cb /lib/mpi/mpi-cmp.c | |
parent | b2911a84396f72149dce310a3b64d8948212c1b3 (diff) |
mac80211: free sta in sta_info_insert_finish() on errors
If sta_info_insert_finish() fails, we currently keep the station
around and free it only in the caller, but there's only one such
caller and it always frees it immediately.
As syzbot found, another consequence of this split is that we can
put things that sleep only into __cleanup_single_sta() and not in
sta_info_free(), but this is the only place that requires such of
sta_info_free() now.
Change this to free the station in sta_info_insert_finish(), in
which case we can still sleep. This will also let us unify the
cleanup code later.
Cc: [email protected]
Fixes: dcd479e10a05 ("mac80211: always wind down STA state")
Reported-by: [email protected]
Reported-by: [email protected]
Reported-by: [email protected]
Reported-by: [email protected]
Reported-by: [email protected]
Reported-by: [email protected]
Link: https://lore.kernel.org/r/20201112112201.ee6b397b9453.I9c31d667a0ea2151441cc64ed6613d36c18a48e0@changeid
Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions