From: Luca Coelho <luca@coelho.fi>
To: Navid Emamdoost <navid.emamdoost@gmail.com>
Cc: emamd001@umn.edu, smccaman@umn.edu, kjlu@umn.edu,
Johannes Berg <johannes.berg@intel.com>,
Emmanuel Grumbach <emmanuel.grumbach@intel.com>,
Intel Linux Wireless <linuxwifi@intel.com>,
Kalle Valo <kvalo@codeaurora.org>,
"David S. Miller" <davem@davemloft.net>,
Shaul Triebitz <shaul.triebitz@intel.com>,
Sara Sharon <sara.sharon@intel.com>,
Shahar S Matityahu <shahar.s.matityahu@intel.com>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iwlwifi: fix memory leaks in iwl_pcie_ctxt_info_gen3_init
Date: Mon, 30 Sep 2019 09:57:00 +0300 [thread overview]
Message-ID: <ab9673e80e53e217b0a4a871713b375b3e4a2fa3.camel@coelho.fi> (raw)
In-Reply-To: <20190927205608.8755-1-navid.emamdoost@gmail.com>
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@gmail.com>
> ---
Thanks, Navid! I have applied this to our internal tree and it will
reach the mainline following our usual upstreaming process.
--
Cheers,
Luca.
prev parent reply other threads:[~2019-09-30 6:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-27 20:56 [PATCH] iwlwifi: fix memory leaks in iwl_pcie_ctxt_info_gen3_init Navid Emamdoost
2019-09-30 6:57 ` Luca Coelho [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ab9673e80e53e217b0a4a871713b375b3e4a2fa3.camel@coelho.fi \
--to=luca@coelho.fi \
--cc=davem@davemloft.net \
--cc=emamd001@umn.edu \
--cc=emmanuel.grumbach@intel.com \
--cc=johannes.berg@intel.com \
--cc=kjlu@umn.edu \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linuxwifi@intel.com \
--cc=navid.emamdoost@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=sara.sharon@intel.com \
--cc=shahar.s.matityahu@intel.com \
--cc=shaul.triebitz@intel.com \
--cc=smccaman@umn.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).