sst-linux/net/mac80211
Dmitry Antipov db5ca4b42c wifi: mac80211: use two-phase skb reclamation in ieee80211_do_stop()
[ Upstream commit 9d301de12da6e1bb069a9835c38359b8e8135121 ]

Since '__dev_queue_xmit()' should be called with interrupts enabled,
the following backtrace:

ieee80211_do_stop()
 ...
 spin_lock_irqsave(&local->queue_stop_reason_lock, flags)
 ...
 ieee80211_free_txskb()
  ieee80211_report_used_skb()
   ieee80211_report_ack_skb()
    cfg80211_mgmt_tx_status_ext()
     nl80211_frame_tx_status()
      genlmsg_multicast_netns()
       genlmsg_multicast_netns_filtered()
        nlmsg_multicast_filtered()
	 netlink_broadcast_filtered()
	  do_one_broadcast()
	   netlink_broadcast_deliver()
	    __netlink_sendskb()
	     netlink_deliver_tap()
	      __netlink_deliver_tap_skb()
	       dev_queue_xmit()
	        __dev_queue_xmit() ; with IRQS disabled
 ...
 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags)

issues the warning (as reported by syzbot reproducer):

WARNING: CPU: 2 PID: 5128 at kernel/softirq.c:362 __local_bh_enable_ip+0xc3/0x120

Fix this by implementing a two-phase skb reclamation in
'ieee80211_do_stop()', where actual work is performed
outside of a section with interrupts disabled.

Fixes: 5061b0c2b9 ("mac80211: cooperate more with network namespaces")
Reported-by: syzbot+1a3986bbd3169c307819@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=1a3986bbd3169c307819
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Link: https://patch.msgid.link/20240906123151.351647-1-dmantipov@yandex.ru
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-17 15:20:42 +02:00
..
aead_api.c
aead_api.h
aes_ccm.h
aes_cmac.c
aes_cmac.h
aes_gcm.h
aes_gmac.c
aes_gmac.h
agg-rx.c
agg-tx.c wifi: mac80211: fix BA session teardown race 2024-08-29 17:30:28 +02:00
airtime.c
cfg.c wifi: mac80211: check basic rates validity 2024-08-03 08:49:47 +02:00
chan.c
debug.h
debugfs_key.c
debugfs_key.h
debugfs_netdev.c wifi: mac80211: remove mesh forwarding congestion check 2024-08-29 17:30:21 +02:00
debugfs_netdev.h
debugfs_sta.c
debugfs_sta.h
debugfs.c
debugfs.h
driver-ops.c wifi: mac80211: fix BA session teardown race 2024-08-29 17:30:28 +02:00
driver-ops.h
eht.c
ethtool.c
fils_aead.c
fils_aead.h
he.c wifi: mac80211: correctly parse Spatial Reuse Parameter Set element 2024-06-21 14:35:32 +02:00
ht.c
ibss.c
ieee80211_i.h wifi: mac80211: remove mesh forwarding congestion check 2024-08-29 17:30:21 +02:00
iface.c wifi: mac80211: use two-phase skb reclamation in ieee80211_do_stop() 2024-10-17 15:20:42 +02:00
Kconfig
key.c
key.h
led.c
led.h
link.c
main.c wifi: mac80211: disable softirqs for queued frame handling 2024-07-25 09:49:20 +02:00
Makefile
mesh_hwmp.c
mesh_pathtbl.c wifi: mac80211: mesh: Fix leak of mesh_preq_queue objects 2024-06-21 14:35:31 +02:00
mesh_plink.c
mesh_ps.c
mesh_sync.c
mesh.c wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata 2024-07-25 09:49:09 +02:00
mesh.h
michael.c
michael.h
mlme.c wifi: mac80211: ensure beacon is non-S1G prior to extracting the beacon timestamp field 2024-06-12 11:02:58 +02:00
ocb.c
offchannel.c wifi: mac80211: don't use rate mask for offchannel TX either 2024-10-17 15:20:38 +02:00
pm.c
rate.c wifi: mac80211: don't use rate mask for offchannel TX either 2024-10-17 15:20:38 +02:00
rate.h
rc80211_minstrel_ht_debugfs.c
rc80211_minstrel_ht.c
rc80211_minstrel_ht.h
rx.c wifi: mac80211: fix potential null pointer dereference 2024-08-29 17:30:55 +02:00
s1g.c
scan.c wifi: mac80211: don't use rate mask for offchannel TX either 2024-10-17 15:20:38 +02:00
spectmgmt.c
sta_info.c wifi: mac80211: fix BA session teardown race 2024-08-29 17:30:28 +02:00
sta_info.h wifi: mac80211: add documentation for amsdu_mesh_control 2024-08-29 17:30:54 +02:00
status.c
tdls.c
tkip.c
tkip.h
trace_msg.h
trace.c
trace.h
tx.c wifi: mac80211: don't use rate mask for offchannel TX either 2024-10-17 15:20:38 +02:00
util.c wifi: mac80211: disable softirqs for queued frame handling 2024-07-25 09:49:20 +02:00
vht.c wifi: mac80211: track capability/opmode NSS separately 2024-08-03 08:49:46 +02:00
wep.c
wep.h
wme.c
wme.h
wpa.c
wpa.h