linux/net/mac80211
Dmitry Antipov 9d301de12d wifi: mac80211: use two-phase skb reclamation in ieee80211_do_stop()
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>
2024-09-09 11:45:06 +02:00
..
tests
Kconfig
Makefile
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
airtime.c wifi: mac80211: introduce EHT rate support in AQL airtime 2024-09-06 12:58:36 +02:00
cfg.c wifi: cfg80211/mac80211: use proper link ID for DFS 2024-09-06 13:01:05 +02:00
chan.c wifi: mac80211: handle ieee80211_radar_detected() for MLO 2024-09-06 13:01:05 +02:00
debug.h
debugfs.c
debugfs.h
debugfs_key.c
debugfs_key.h
debugfs_netdev.c
debugfs_netdev.h
debugfs_sta.c
debugfs_sta.h
driver-ops.c
driver-ops.h
drop.h
eht.c
ethtool.c
fils_aead.c
fils_aead.h
he.c
ht.c
ibss.c
ieee80211_i.h wifi: mac80211: handle ieee80211_radar_detected() for MLO 2024-09-06 13:01:05 +02:00
iface.c wifi: mac80211: use two-phase skb reclamation in ieee80211_do_stop() 2024-09-09 11:45:06 +02:00
key.c
key.h
led.c
led.h
link.c wifi: mac80211: handle DFS per link 2024-09-06 13:01:05 +02:00
main.c wifi: mac80211: use kmemdup_array instead of kmemdup for multiple allocation 2024-08-27 10:28:56 +02:00
mesh.c
mesh.h
mesh_hwmp.c
mesh_pathtbl.c wifi: mac80211: remove redundant unlikely() around IS_ERR() 2024-08-27 10:28:55 +02:00
mesh_plink.c
mesh_ps.c
mesh_sync.c
michael.c
michael.h
mlme.c wifi: cfg80211/mac80211: use proper link ID for DFS 2024-09-06 13:01:05 +02:00
ocb.c
offchannel.c
parse.c
pm.c wifi: mac80211: handle ieee80211_radar_detected() for MLO 2024-09-06 13:01:05 +02:00
rate.c
rate.h
rc80211_minstrel_ht.c
rc80211_minstrel_ht.h
rc80211_minstrel_ht_debugfs.c
rx.c
s1g.c
scan.c wifi: cfg80211/mac80211: use proper link ID for DFS 2024-09-06 13:01:05 +02:00
spectmgmt.c
sta_info.c
sta_info.h
status.c wifi: mac80211: export ieee80211_purge_tx_queue() for drivers 2024-08-27 10:28:55 +02:00
tdls.c
tkip.c
tkip.h
trace.c
trace.h
trace_msg.h
tx.c wireless-next patches for v6.12 2024-09-04 17:20:14 -07:00
util.c wifi: mac80211: handle ieee80211_radar_detected() for MLO 2024-09-06 13:01:05 +02:00
vht.c
wbrf.c
wep.c
wep.h
wme.c
wme.h
wpa.c
wpa.h