acrn-kernel/net/mac80211
Johannes Berg 7bc40aedf2 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: stable@vger.kernel.org
Fixes: dcd479e10a ("mac80211: always wind down STA state")
Reported-by: syzbot+32c6c38c4812d22f2f0b@syzkaller.appspotmail.com
Reported-by: syzbot+4c81fe92e372d26c4246@syzkaller.appspotmail.com
Reported-by: syzbot+6a7fe9faf0d1d61bc24a@syzkaller.appspotmail.com
Reported-by: syzbot+abed06851c5ffe010921@syzkaller.appspotmail.com
Reported-by: syzbot+b7aeb9318541a1c709f1@syzkaller.appspotmail.com
Reported-by: syzbot+d5a9416c6cafe53b5dd0@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20201112112201.ee6b397b9453.I9c31d667a0ea2151441cc64ed6613d36c18a48e0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-11-13 09:48:32 +01:00
..
Kconfig
Makefile mac80211: initialize last_rate for S1G STAs 2020-10-08 10:40:57 +02:00
aead_api.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
aead_api.h
aes_ccm.h
aes_cmac.c
aes_cmac.h
aes_gcm.h
aes_gmac.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
aes_gmac.h
agg-rx.c net: mac80211: agg-rx.c: fix duplicated words 2020-08-27 11:23:08 +02:00
agg-tx.c
airtime.c mac80211: add AQL support for VHT160 tx rates 2020-09-18 11:36:03 +02:00
cfg.c mac80211: copy configured beacon tx rate to driver 2020-10-08 12:26:35 +02:00
chan.c mac80211: get correct default channel width for S1G 2020-09-28 13:53:05 +02:00
debug.h
debugfs.c mac80211: rework tx encapsulation offload API 2020-09-18 12:02:57 +02:00
debugfs.h
debugfs_key.c
debugfs_key.h
debugfs_netdev.c cfg80211/mac80211: add connected to auth server to meshconf 2020-07-31 09:24:24 +02:00
debugfs_netdev.h
debugfs_sta.c
debugfs_sta.h
driver-ops.c
driver-ops.h mac80211: notify the driver when a sta uses 4-address mode 2020-09-18 12:16:16 +02:00
ethtool.c
fils_aead.c
fils_aead.h
he.c
ht.c mac80211: Use fallthrough pseudo-keyword 2020-07-31 09:24:23 +02:00
ibss.c mac80211: support S1G association 2020-09-28 14:09:07 +02:00
ieee80211_i.h mac80211: initialize last_rate for S1G STAs 2020-10-08 10:40:57 +02:00
iface.c mac80211: use new function dev_fetch_sw_netstats 2020-10-13 17:33:49 -07:00
key.c mac80211: rework tx encapsulation offload API 2020-09-18 12:02:57 +02:00
key.h
led.c
led.h
main.c mac80211: rename csa counters to countdown counters 2020-08-27 14:12:15 +02:00
mesh.c mac80211: rename csa counters to countdown counters 2020-08-27 14:12:15 +02:00
mesh.h
mesh_hwmp.c mac80211: swap NEED_TXPROCESSING and HW_80211_ENCAP tx flags 2020-09-18 12:13:06 +02:00
mesh_pathtbl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-08-02 01:02:12 -07:00
mesh_plink.c mac80211: fix some more kernel-doc in mesh 2020-09-28 14:36:53 +02:00
mesh_ps.c mac80211: fix some more kernel-doc in mesh 2020-09-28 14:36:53 +02:00
mesh_sync.c
michael.c
michael.h
mlme.c mac80211: don't require VHT elements for HE on 2.4 GHz 2020-10-30 10:22:42 +01:00
ocb.c
offchannel.c mac80211: Inform AP when returning operating channel 2020-09-28 13:18:53 +02:00
pm.c
rate.c mac80211: initialize last_rate for S1G STAs 2020-10-08 10:40:57 +02:00
rate.h
rc80211_minstrel.c mac80211: minstrel: fix tx status processing corner case 2020-11-12 11:25:09 +01:00
rc80211_minstrel.h mac80211: minstrel: remove deferred sampling code 2020-11-12 11:24:43 +01:00
rc80211_minstrel_debugfs.c
rc80211_minstrel_ht.c
rc80211_minstrel_ht.h
rc80211_minstrel_ht_debugfs.c
rx.c mac80211: receive and process S1G beacons 2020-09-28 14:01:00 +02:00
s1g.c mac80211: initialize last_rate for S1G STAs 2020-10-08 10:40:57 +02:00
scan.c mac80211: convert S1G beacon to scan results 2020-09-28 13:53:25 +02:00
spectmgmt.c
sta_info.c mac80211: free sta in sta_info_insert_finish() on errors 2020-11-13 09:48:32 +01:00
sta_info.h mac80211: fix kernel-doc markups 2020-10-30 10:06:09 +01:00
status.c mac80211: fix memory leak on filtered powersave frames 2020-11-12 11:23:58 +01:00
tdls.c mac80211: Use fallthrough pseudo-keyword 2020-07-31 09:24:23 +02:00
tkip.c
tkip.h
trace.c
trace.h mac80211: notify the driver when a sta uses 4-address mode 2020-09-18 12:16:16 +02:00
trace_msg.h
tx.c mac80211: fix use of skb payload instead of header 2020-10-30 10:03:48 +01:00
util.c mac80211: Support not iterating over not-sdata-in-driver ifaces 2020-09-28 15:05:53 +02:00
vht.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-22 16:45:34 -07:00
wep.c
wep.h
wme.c mac80211: Use fallthrough pseudo-keyword 2020-07-31 09:24:23 +02:00
wme.h
wpa.c
wpa.h