On 2022/12/1 20:52, Johannes Berg wrote:
On Tue, 2022-11-22 at 17:11 +0800, Zhengchao Shao wrote:
+++ b/net/mac80211/iface.c
@@ -2326,8 +2326,6 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local)
WARN(local->open_count, "%s: open count remains %d\n",
wiphy_name(local->hw.wiphy), local->open_count);
- ieee80211_txq_teardown_flows(local);
This is after shutting down interfaces.
@@ -1469,6 +1470,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
* because the driver cannot be handing us frames any
* more and the tasklet is killed.
*/
+ ieee80211_txq_teardown_flows(local);
ieee80211_remove_interfaces(local);
But now it's before. Why is that safe?
johannes
Hi johannes:
Thank you for your review. This change may be unsafe.
Driver do clear its reource must be after hardware stop. Remove
it before shutdown interface is unsafe. I will change in V2.
Zhengchao Shao