2009-01-28 17:35:35

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH v2.6.29] iwlwifi: clean key table in iwl_clear_stations_table

Cleans uCode key table bit map iwl_clear_stations_table
since all stations are cleared also the key table must be.

Since the keys are not removed properly on suspend by mac80211
this may result in exhausting key table on resume leading
to memory corruption during removal

Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Reinette Chatre <[email protected]>
---
This change originally formed part of commit
40a9a8299116297429298e8fcee08235134883f7 "iwlwifi: clean key table in
iwl_clear_stations_table function". After that patch this function was
moved to iwl-sta.c with commit 565ddeb389362b42df69e26804903ecd2303bb8e.

This change was lost between 2.6.28 and 2.6.29-rc1, so adding it back here.

This will fix http://bugzilla.kernel.org/show_bug.cgi?id=12415

drivers/net/wireless/iwlwifi/iwl-sta.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index 7d2129c..1fae3a6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -483,6 +483,9 @@ void iwl_clear_stations_table(struct iwl_priv *priv)
priv->num_stations = 0;
memset(priv->stations, 0, sizeof(priv->stations));

+ /* clean ucode key table bit map */
+ priv->ucode_key_table = 0;
+
spin_unlock_irqrestore(&priv->sta_lock, flags);
}
EXPORT_SYMBOL(iwl_clear_stations_table);
--
1.5.4.3



2009-01-28 21:36:35

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH v2.6.29] iwlwifi: clean key table in iwl_clear_stations_table

On Wed, 2009-01-28 at 13:25 -0800, reinette chatre wrote:
> On Wed, 2009-01-28 at 11:05 -0800, Johannes Berg wrote:
> > On Wed, 2009-01-28 at 09:38 -0800, Reinette Chatre wrote:
> > > Cleans uCode key table bit map iwl_clear_stations_table
> > > since all stations are cleared also the key table must be.
> > >
> > > Since the keys are not removed properly on suspend by mac80211
> > > this may result in exhausting key table on resume leading
> > > to memory corruption during removal
> >
> > Just FYI, this is fixed now in mac80211.
>
> Sorry - I missed this. Could you please point me to the patch?
> The problem was encountered in 2.6.29-rc2 (see
> http://bugzilla.kernel.org/show_bug.cgi?id=12415 ) and I would like to
> know if this patch you refer to is included there. If so then we have
> another issue.

Sorry, my mistake, the patch to fix mac80211 suspend/resume is in
for .30.

johannes


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part

2009-01-28 21:22:56

by Reinette Chatre

[permalink] [raw]
Subject: Re: [PATCH v2.6.29] iwlwifi: clean key table in iwl_clear_stations_table

On Wed, 2009-01-28 at 11:05 -0800, Johannes Berg wrote:
> On Wed, 2009-01-28 at 09:38 -0800, Reinette Chatre wrote:
> > Cleans uCode key table bit map iwl_clear_stations_table
> > since all stations are cleared also the key table must be.
> >
> > Since the keys are not removed properly on suspend by mac80211
> > this may result in exhausting key table on resume leading
> > to memory corruption during removal
>
> Just FYI, this is fixed now in mac80211.

Sorry - I missed this. Could you please point me to the patch?
The problem was encountered in 2.6.29-rc2 (see
http://bugzilla.kernel.org/show_bug.cgi?id=12415 ) and I would like to
know if this patch you refer to is included there. If so then we have
another issue.

Thanks

Reinette



2009-01-28 20:37:08

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH v2.6.29] iwlwifi: clean key table in iwl_clear_stations_table

On Wed, 2009-01-28 at 09:38 -0800, Reinette Chatre wrote:
> Cleans uCode key table bit map iwl_clear_stations_table
> since all stations are cleared also the key table must be.
>
> Since the keys are not removed properly on suspend by mac80211
> this may result in exhausting key table on resume leading
> to memory corruption during removal

Just FYI, this is fixed now in mac80211.

johannes


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part