linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] rsi: Fix memory leak in module unload
@ 2016-10-13 11:25 Prameela Rani Garnepudi
  2016-10-13 13:11 ` Kalle Valo
  2016-11-17  6:44 ` [1/3] " Kalle Valo
  0 siblings, 2 replies; 5+ messages in thread
From: Prameela Rani Garnepudi @ 2016-10-13 11:25 UTC (permalink / raw)
  To: linux-wireless
  Cc: kvalo, johannes.berg, hofrat, xypron.glpk, prameela.garnepudi,
	Prameela Rani Garnepudi

Observed crash when module is unloaded if CONFIG_RSI_DEBUGSFS is not set.
	Fix: Debugfs entry removal moved inside CONFIG_RSI_DEBUGSFS flag in
             function rsi_mac80211_detach()
Memory leak found and fixed for below structures in function rsi_mac80211_detach()
	* channel list for each supported band
	* rsi debugfs info

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
---
 drivers/net/wireless/rsi/rsi_91x_mac80211.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index dbb2389..58779c0 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -194,6 +194,7 @@ static void rsi_register_rates_channels(struct rsi_hw *adapter, int band)
 void rsi_mac80211_detach(struct rsi_hw *adapter)
 {
 	struct ieee80211_hw *hw = adapter->hw;
+	enum nl80211_band band;
 
 	if (hw) {
 		ieee80211_stop_queues(hw);
@@ -201,7 +202,17 @@ void rsi_mac80211_detach(struct rsi_hw *adapter)
 		ieee80211_free_hw(hw);
 	}
 
+	for (band = 0; band < NUM_NL80211_BANDS; band++) {
+		struct ieee80211_supported_band *sband =
+					&adapter->sbands[band];
+
+		kfree(sband->channels);
+	}
+
+#ifdef CONFIG_RSI_DEBUGFS
 	rsi_remove_dbgfs(adapter);
+	kfree(adapter->dfsentry);
+#endif
 }
 EXPORT_SYMBOL_GPL(rsi_mac80211_detach);
 
-- 
2.4.11

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

* Re: [PATCH 1/3] rsi: Fix memory leak in module unload
  2016-10-13 11:25 [PATCH 1/3] rsi: Fix memory leak in module unload Prameela Rani Garnepudi
@ 2016-10-13 13:11 ` Kalle Valo
  2016-10-13 14:26   ` Kalle Valo
  2016-11-17  6:44 ` [1/3] " Kalle Valo
  1 sibling, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2016-10-13 13:11 UTC (permalink / raw)
  To: Prameela Rani Garnepudi
  Cc: linux-wireless, johannes.berg, hofrat, xypron.glpk,
	prameela.garnepudi

Prameela Rani Garnepudi <prameela.j04cs@gmail.com> writes:

> Observed crash when module is unloaded if CONFIG_RSI_DEBUGSFS is not set.
> 	Fix: Debugfs entry removal moved inside CONFIG_RSI_DEBUGSFS flag in
>              function rsi_mac80211_detach()
> Memory leak found and fixed for below structures in function rsi_mac80211_detach()
> 	* channel list for each supported band
> 	* rsi debugfs info
>
> Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>

BTW, I don't see patch 2 in patchwork nor in linux-wireless, but I do
see it on my inbox. Either it's slow or there was a problem with the
delivery.

-- 
Kalle Valo

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

* Re: [PATCH 1/3] rsi: Fix memory leak in module unload
  2016-10-13 13:11 ` Kalle Valo
@ 2016-10-13 14:26   ` Kalle Valo
       [not found]     ` <7a4d28a2-53ac-bc81-bf2c-452434d6768e@redpinesignals.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2016-10-13 14:26 UTC (permalink / raw)
  To: Prameela Rani Garnepudi
  Cc: linux-wireless, johannes.berg, hofrat, xypron.glpk,
	prameela.garnepudi

Kalle Valo <kvalo@codeaurora.org> writes:

> Prameela Rani Garnepudi <prameela.j04cs@gmail.com> writes:
>
>> Observed crash when module is unloaded if CONFIG_RSI_DEBUGSFS is not set.
>> 	Fix: Debugfs entry removal moved inside CONFIG_RSI_DEBUGSFS flag in
>>              function rsi_mac80211_detach()
>> Memory leak found and fixed for below structures in function rsi_mac80211_detach()
>> 	* channel list for each supported band
>> 	* rsi debugfs info
>>
>> Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
>
> BTW, I don't see patch 2 in patchwork nor in linux-wireless, but I do
> see it on my inbox. Either it's slow or there was a problem with the
> delivery.

It was just slow, I see it now:

https://patchwork.kernel.org/patch/9374987/

-- 
Kalle Valo

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

* Re: [PATCH 1/3] rsi: Fix memory leak in module unload
       [not found]     ` <7a4d28a2-53ac-bc81-bf2c-452434d6768e@redpinesignals.com>
@ 2016-10-26  6:47       ` Kalle Valo
  0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2016-10-26  6:47 UTC (permalink / raw)
  To: Prameela Rani Garnepudi
  Cc: Prameela Rani Garnepudi, linux-wireless, johannes.berg, hofrat,
	xypron.glpk

Prameela Rani Garnepudi <prameela.garnepudi@redpinesignals.com> writes:

> On 10/13/2016 07:56 PM, Kalle Valo wrote: 
>> Kalle Valo <kvalo@codeaurora.org> writes: 
>> 
>>> Prameela Rani Garnepudi <prameela.j04cs@gmail.com> writes: 
>>> 
>>>> Observed crash when module is unloaded if CONFIG_RSI_DEBUGSFS is not set. 
>>>>     Fix: Debugfs entry removal moved inside CONFIG_RSI_DEBUGSFS flag in 
>>>>               function rsi_mac80211_detach() 
>>>> Memory leak found and fixed for below structures in function
> rsi_mac80211_detach() 
>>>>     * channel list for each supported band 
>>>>     * rsi debugfs info 
>>>> 
>>>> Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com> 
>>> BTW, I don't see patch 2 in patchwork nor in linux-wireless, but I do 
>>> see it on my inbox. Either it's slow or there was a problem with the 
>>> delivery. 
>> It was just slow, I see it now: 
>> 
>> https://patchwork.kernel.org/patch/9374987/ 
>> 
> Hi, 
> Can you please review this patch. 

wireless-drivers-next is not open yet as I was on vacation last week,
hoping to open it today.

And instead of mailing me please check the status from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#checking_state_of_patches_from_patchwork

If you see lots of patches pending submitted around the same time as
yours it's a pretty good hint that I just haven't been able to go
through my queue:

https://patchwork.kernel.org/project/linux-wireless/list/?state=*&delegate=25621

-- 
Kalle Valo

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

* Re: [1/3] rsi: Fix memory leak in module unload
  2016-10-13 11:25 [PATCH 1/3] rsi: Fix memory leak in module unload Prameela Rani Garnepudi
  2016-10-13 13:11 ` Kalle Valo
@ 2016-11-17  6:44 ` Kalle Valo
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2016-11-17  6:44 UTC (permalink / raw)
  To: Prameela Rani Garnepudi
  Cc: linux-wireless, johannes.berg, hofrat, xypron.glpk,
	prameela.garnepudi, Prameela Rani Garnepudi

Prameela Rani Garnepudi <prameela.j04cs@gmail.com> wrote:
> Observed crash when module is unloaded if CONFIG_RSI_DEBUGSFS is not set.
> 	Fix: Debugfs entry removal moved inside CONFIG_RSI_DEBUGSFS flag in
>              function rsi_mac80211_detach()
> Memory leak found and fixed for below structures in function rsi_mac80211_detach()
> 	* channel list for each supported band
> 	* rsi debugfs info
> 
> Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>

2 patches applied to wireless-drivers-next.git, thanks.

b022539db49a rsi: Fix memory leak in module unload
77364aae88d7 rsi: Host to device command frame vap_capabilites modified with new field vap status

-- 
https://patchwork.kernel.org/patch/9374919/

Documentation about submitting wireless patches and checking status
from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

end of thread, other threads:[~2016-11-17  6:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-13 11:25 [PATCH 1/3] rsi: Fix memory leak in module unload Prameela Rani Garnepudi
2016-10-13 13:11 ` Kalle Valo
2016-10-13 14:26   ` Kalle Valo
     [not found]     ` <7a4d28a2-53ac-bc81-bf2c-452434d6768e@redpinesignals.com>
2016-10-26  6:47       ` Kalle Valo
2016-11-17  6:44 ` [1/3] " Kalle Valo

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).