linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.18 01/76] mac80211: Run TXQ teardown code before de-registering interfaces
@ 2018-09-24 14:48 Sasha Levin
  2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 02/76] mac80211_hwsim: require at least one channel Sasha Levin
                   ` (73 more replies)
  0 siblings, 74 replies; 75+ messages in thread
From: Sasha Levin @ 2018-09-24 14:48 UTC (permalink / raw)
  To: stable, linux-kernel
  Cc: Toke Høiland-Jørgensen, Johannes Berg, Sasha Levin

From: Toke Høiland-Jørgensen <toke@toke.dk>

[ Upstream commit 77cfaf52eca5cac30ed029507e0cab065f888995 ]

The TXQ teardown code can reference the vif data structures that are
stored in the netdev private memory area if there are still packets on
the queue when it is being freed. Since the TXQ teardown code is run
after the netdevs are freed, this can lead to a use-after-free. Fix this
by moving the TXQ teardown code to earlier in ieee80211_unregister_hw().

Reported-by: Ben Greear <greearb@candelatech.com>
Tested-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
---
 net/mac80211/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index fb73451ed85e..0358f20b675f 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1182,6 +1182,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
 #if IS_ENABLED(CONFIG_IPV6)
 	unregister_inet6addr_notifier(&local->ifa6_notifier);
 #endif
+	ieee80211_txq_teardown_flows(local);
 
 	rtnl_lock();
 
@@ -1210,7 +1211,6 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
 	skb_queue_purge(&local->skb_queue);
 	skb_queue_purge(&local->skb_queue_unreliable);
 	skb_queue_purge(&local->skb_queue_tdls_chsw);
-	ieee80211_txq_teardown_flows(local);
 
 	destroy_workqueue(local->workqueue);
 	wiphy_unregister(local->hw.wiphy);
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 75+ messages in thread

end of thread, other threads:[~2018-09-24 15:12 UTC | newest]

Thread overview: 75+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-24 14:48 [PATCH AUTOSEL 4.18 01/76] mac80211: Run TXQ teardown code before de-registering interfaces Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 02/76] mac80211_hwsim: require at least one channel Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 03/76] Btrfs: fix unexpected failure of nocow buffered writes after snapshotting when low on space Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 04/76] KVM: PPC: Book3S HV: Don't truncate HPTE index in xlate function Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 06/76] btrfs: btrfs_shrink_device should call commit transaction at the end Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 05/76] cfg80211: remove division by size of sizeof(struct ieee80211_wmm_rule) Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 07/76] scsi: csiostor: add a check for NULL pointer after kmalloc() Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 08/76] scsi: csiostor: fix incorrect port capabilities Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 09/76] scsi: libata: Add missing newline at end of file Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 10/76] scsi: aacraid: fix a signedness bug Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 11/76] bpf, sockmap: fix potential use after free in bpf_tcp_close Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 12/76] bpf, sockmap: fix psock refcount leak in bpf_tcp_recvmsg Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 13/76] bpf: sockmap, decrement copied count correctly in redirect error case Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 14/76] mac80211: correct use of IEEE80211_VHT_CAP_RXSTBC_X Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 15/76] mac80211_hwsim: " Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 16/76] cfg80211: make wmm_rule part of the reg_rule structure Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 17/76] mac80211_hwsim: Fix possible Spectre-v1 for hwsim_world_regdom_custom Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 18/76] nl80211: Fix nla_put_u8 to u16 for NL80211_WMMR_TXOP Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 19/76] nl80211: Pass center frequency in kHz instead of MHz Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 20/76] bpf: fix several offset tests in bpf_msg_pull_data Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 21/76] gpio: adp5588: Fix sleep-in-atomic-context bug Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 23/76] mac80211: avoid kernel panic when building AMSDU from non-linear SKB Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 22/76] mac80211: mesh: fix HWMP sequence numbering to follow standard Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 24/76] gpiolib: acpi: Switch to cansleep version of GPIO library call Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 25/76] gpiolib-acpi: Register GpioInt ACPI event handlers from a late_initcall Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 26/76] gpio: dwapb: Fix error handling in dwapb_gpio_probe() Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 27/76] bpf: fix msg->data/data_end after sg shift repair in bpf_msg_pull_data Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 28/76] bpf: fix shift upon scatterlist ring wrap-around " Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 29/76] bpf: fix sg shift repair start offset " Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 31/76] net: hns: add the code for cleaning pkt in chip Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 32/76] net: hns: add netif_carrier_off before change speed and duplex Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 33/76] sh_eth: Add R7S9210 support Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 35/76] tc-testing: add test-cases for numeric and invalid control action Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 34/76] net: mvpp2: initialize port of_node pointer Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 36/76] cfg80211: nl80211_update_ft_ies() to validate NL80211_ATTR_IE Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 37/76] mac80211: do not convert to A-MSDU if frag/subframe limited Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 38/76] mac80211: always account for A-MSDU header changes Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 39/76] tools/kvm_stat: fix python3 issues Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 40/76] tools/kvm_stat: fix handling of invalid paths in debugfs provider Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 41/76] tools/kvm_stat: fix updates for dead guests Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 42/76] gpio: Fix crash due to registration race Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 43/76] ARC: atomics: unbork atomic_fetch_##op() Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 44/76] Revert "blk-throttle: fix race between blkcg_bio_issue_check() and cgroup_rmdir()" Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 45/76] md/raid5-cache: disable reshape completely Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 47/76] selftests: pmtu: maximum MTU for vti4 is 2^16-1-20 Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 46/76] RAID10 BUG_ON in raise_barrier when force is true and conf->barrier is 0 Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 49/76] ibmvnic: Include missing return code checks in reset function Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 48/76] selftests: pmtu: detect correct binary to ping ipv6 addresses Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 51/76] bpf: avoid misuse of psock when TCP_ULP_BPF collides with another ULP Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 50/76] bpf: Fix bpf_msg_pull_data() Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 52/76] net: ethernet: cpsw-phy-sel: prefer phandle for phy sel Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 53/76] i2c: uniphier: issue STOP only for last message or I2C_M_STOP Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 54/76] i2c: uniphier-f: " Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 56/76] fs/cifs: don't translate SFM_SLASH (U+F026) to backslash Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 55/76] net: cadence: Fix a sleep-in-atomic-context bug in macb_halt_tx() Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 57/76] mac80211: fix an off-by-one issue in A-MSDU max_subframe computation Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 58/76] cfg80211: fix a type issue in ieee80211_chandef_to_operating_class() Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 60/76] mac80211: fix a race between restart and CSA flows Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 59/76] mac80211: fix WMM TXOP calculation Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 62/76] mac80211: don't Tx a deauth frame if the AP forbade Tx Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 61/76] mac80211: Fix station bandwidth setting after channel switch Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 63/76] mac80211: shorten the IBSS debug messages Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 64/76] fsnotify: fix ignore mask logic in fsnotify() Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 65/76] net/ibm/emac: wrong emac_calc_base call was used by typo Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 66/76] nds32: fix logic for module Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 68/76] nds32: Fix empty call trace Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 67/76] nds32: add NULL entry to the end of_device_id array Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 70/76] nds32: fix build error because of wrong semicolon Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 69/76] nds32: Fix get_user/put_user macro expand pointer problem Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 71/76] tools/vm/slabinfo.c: fix sign-compare warning Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 72/76] tools/vm/page-types.c: fix "defined but not used" warning Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 74/76] ceph: avoid a use-after-free in ceph_destroy_options() Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 73/76] nds32: linker script: GCOV kernel may refers data in __exit Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 75/76] firmware: arm_scmi: fix divide by zero when sustained_perf_level is zero Sasha Levin
2018-09-24 14:48 ` [PATCH AUTOSEL 4.18 76/76] afs: Fix cell specification to permit an empty address list Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).