[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <84669e9c-81f7-3a56-ea57-39df3e131b3f@huawei.com>
Date: Fri, 2 Dec 2022 10:48:12 +0800
From: shaozhengchao <shaozhengchao@...wei.com>
To: Johannes Berg <johannes@...solutions.net>,
<linux-wireless@...r.kernel.org>, <netdev@...r.kernel.org>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>
CC: <sara.sharon@...el.com>, <luciano.coelho@...el.com>,
<weiyongjun1@...wei.com>, <yuehaibing@...wei.com>
Subject: Re: [PATCH] wifi: mac80211: fix memory leak in
ieee80211_register_hw()
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
Powered by blists - more mailing lists