[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ab9673e80e53e217b0a4a871713b375b3e4a2fa3.camel@coelho.fi>
Date: Mon, 30 Sep 2019 09:57:00 +0300
From: Luca Coelho <luca@...lho.fi>
To: Navid Emamdoost <navid.emamdoost@...il.com>
Cc: emamd001@....edu, smccaman@....edu, kjlu@....edu,
Johannes Berg <johannes.berg@...el.com>,
Emmanuel Grumbach <emmanuel.grumbach@...el.com>,
Intel Linux Wireless <linuxwifi@...el.com>,
Kalle Valo <kvalo@...eaurora.org>,
"David S. Miller" <davem@...emloft.net>,
Shaul Triebitz <shaul.triebitz@...el.com>,
Sara Sharon <sara.sharon@...el.com>,
Shahar S Matityahu <shahar.s.matityahu@...el.com>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iwlwifi: fix memory leaks in
iwl_pcie_ctxt_info_gen3_init
On Fri, 2019-09-27 at 15:56 -0500, Navid Emamdoost wrote:
> In iwl_pcie_ctxt_info_gen3_init there are cases that the allocated dma
> memory is leaked in case of error.
> DMA memories prph_scratch, prph_info, and ctxt_info_gen3 are allocated
> and initialized to be later assigned to trans_pcie. But in any error case
> before such assignment the allocated memories should be released.
> First of such error cases happens when iwl_pcie_init_fw_sec fails.
> Current implementation correctly releases prph_scratch. But in two
> sunsequent error cases where dma_alloc_coherent may fail, such releases
> are missing. This commit adds release for prph_scratch when allocation
> for prph_info fails, and adds releases for prph_scratch and prph_info
> when allocation for ctxt_info_gen3 fails.
>
> Fixes: 2ee824026288 ("iwlwifi: pcie: support context information for 22560 devices")
>
> Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.com>
> ---
Thanks, Navid! I have applied this to our internal tree and it will
reach the mainline following our usual upstreaming process.
--
Cheers,
Luca.
Powered by blists - more mailing lists