kernel_samsung_a53x/net/mac80211
Dmitry Antipov 25eb51c765 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: 5061b0c2b906 ("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-11-23 23:21:18 +01:00
..
aead_api.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aead_api.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aes_ccm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aes_cmac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aes_cmac.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aes_gcm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aes_gmac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aes_gmac.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
agg-rx.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
agg-tx.c wifi: mac80211: fix BA session teardown race 2024-11-23 23:20:44 +01:00
airtime.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cfg.c wifi: mac80211: check/clear fast rx for non-4addr sta VLAN changes 2024-11-19 09:22:41 +01:00
chan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debug.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
debugfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs_key.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs_key.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs_netdev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs_netdev.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs_sta.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
debugfs_sta.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
driver-ops.c wifi: mac80211: fix BA session teardown race 2024-11-23 23:20:44 +01:00
driver-ops.h Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
ethtool.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fils_aead.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fils_aead.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
he.c wifi: mac80211: correctly parse Spatial Reuse Parameter Set element 2024-11-19 14:19:00 +01:00
ht.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ibss.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ieee80211_i.h wifi: mac80211: fix ieee80211_bss_*_flags kernel-doc 2024-11-19 11:32:43 +01:00
iface.c wifi: mac80211: use two-phase skb reclamation in ieee80211_do_stop() 2024-11-23 23:21:18 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
key.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
key.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
led.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
led.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mesh.c wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata 2024-11-19 14:19:47 +01:00
mesh.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mesh_hwmp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mesh_pathtbl.c wifi: mac80211: mesh: Fix leak of mesh_preq_queue objects 2024-11-19 14:19:00 +01:00
mesh_plink.c wifi: mac80211: mesh_plink: fix matches_local logic 2024-11-18 12:11:58 +01:00
mesh_ps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mesh_sync.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
michael.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
michael.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mlme.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
ocb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
offchannel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rate.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rate.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rc80211_minstrel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rc80211_minstrel.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rc80211_minstrel_debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rc80211_minstrel_ht.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rc80211_minstrel_ht.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rc80211_minstrel_ht_debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rx.c kcov: Remove kcov include from sched.h and move it to its users. 2024-11-19 11:32:46 +01:00
s1g.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scan.c wifi: mac80211: fix UBSAN noise in ieee80211_prep_hw_scan() 2024-11-19 14:19:47 +01:00
spectmgmt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sta_info.c wifi: mac80211: fix BA session teardown race 2024-11-23 23:20:44 +01:00
sta_info.h Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
status.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
tdls.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tkip.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tkip.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.h Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
trace_msg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tx.c wifi: mac80211: fix race condition on enabling fast-xmit 2024-11-18 22:25:32 +01:00
util.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vht.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wep.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wep.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wme.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wme.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wpa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wpa.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00