This is a note to let you know that I've just added the patch titled ath5k: fix memory leak when fewer than N_PD_CURVES are in
to the 2.6.33-longterm tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.33.git;a=summary The filename of the patch is: ath5k-fix-memory-leak-when-fewer-than-n_pd_curves-are-in.patch and it can be found in the queue-2.6.33 subdirectory. If you, or anyone else, feels it should not be added to the 2.6.33 longterm tree, please let <sta...@kernel.org> know about it. >From a0b8de350be458b33248e48b2174d9af8a4c4798 Mon Sep 17 00:00:00 2001 From: "Eugene A. Shatokhin" <dame_eug...@mail.ru> Date: Tue, 28 Jun 2011 23:04:51 -0400 Subject: ath5k: fix memory leak when fewer than N_PD_CURVES are in use From: "Eugene A. Shatokhin" <dame_eug...@mail.ru> commit a0b8de350be458b33248e48b2174d9af8a4c4798 upstream. We would free the proper number of curves, but in the wrong slots, due to a missing level of indirection through the pdgain_idx table. It's simpler just to try to free all four slots, so do that. Signed-off-by: Bob Copeland <m...@bobcopeland.com> Signed-off-by: John W. Linville <linvi...@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gre...@suse.de> --- drivers/net/wireless/ath/ath5k/eeprom.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) --- a/drivers/net/wireless/ath/ath5k/eeprom.c +++ b/drivers/net/wireless/ath/ath5k/eeprom.c @@ -1588,14 +1588,12 @@ ath5k_eeprom_free_pcal_info(struct ath5k if (!chinfo[pier].pd_curves) continue; - for (pdg = 0; pdg < ee->ee_pd_gains[mode]; pdg++) { + for (pdg = 0; pdg < AR5K_EEPROM_N_PD_CURVES; pdg++) { struct ath5k_pdgain_info *pd = &chinfo[pier].pd_curves[pdg]; - if (pd != NULL) { - kfree(pd->pd_step); - kfree(pd->pd_pwr); - } + kfree(pd->pd_step); + kfree(pd->pd_pwr); } kfree(chinfo[pier].pd_curves); Patches currently in longterm-queue-2.6.33 which might be from dame_eug...@mail.ru are /home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/ath5k-fix-memory-leak-when-fewer-than-n_pd_curves-are-in.patch _______________________________________________ stable mailing list stable@linux.kernel.org http://linux.kernel.org/mailman/listinfo/stable