linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Coelho, Luciano" <luciano.coelho@intel.com>
To: "zhangqilong3@huawei.com" <zhangqilong3@huawei.com>,
	"kvalo@codeaurora.org" <kvalo@codeaurora.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>
Cc: linuxwifi <linuxwifi@intel.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"Berg, Johannes" <johannes.berg@intel.com>,
	"Grumbach, Emmanuel" <emmanuel.grumbach@intel.com>
Subject: Re: [PATCH] iwlwifi: mvm: fix a memory leak in iwl_mvm_mac_ctxt_beacon_changed
Date: Tue, 23 Mar 2021 09:04:48 +0000	[thread overview]
Message-ID: <ab261e501db7af2bf80087b8c0211bd58697e080.camel@intel.com> (raw)
In-Reply-To: <20201119124628.2926763-1-zhangqilong3@huawei.com>

On Thu, 2020-11-19 at 20:46 +0800, Zhang Qilong wrote:
> In the error path of iwl_mvm_mac_ctxt_beacon_changed,
> the beacon it not be freed, and use dev_kfree_skb to
> free it.
> 
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> ---
>  drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
> index 8698ca4d30de..e9a804ffd984 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
> @@ -1044,8 +1044,10 @@ int iwl_mvm_mac_ctxt_beacon_changed(struct iwl_mvm *mvm,
>  		return -ENOMEM;
>  
> 
>  #ifdef CONFIG_IWLWIFI_DEBUGFS
> -	if (mvm->beacon_inject_active)
> +	if (mvm->beacon_inject_active) {
> +		dev_kfree_skb(beacon);
>  		return -EBUSY;
> +	}
>  #endif
>  
> 
>  	ret = iwl_mvm_mac_ctxt_send_beacon(mvm, vif, beacon);

Thanks! I applied this now to our internal tree and it will reach the
mainline following our normal process.

--
Cheers.
Luca.

  reply	other threads:[~2021-03-23  9:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 12:46 [PATCH] iwlwifi: mvm: fix a memory leak in iwl_mvm_mac_ctxt_beacon_changed Zhang Qilong
2021-03-23  9:04 ` Coelho, Luciano [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-10-30 10:12 Zhang Qilong

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=ab261e501db7af2bf80087b8c0211bd58697e080.camel@intel.com \
    --to=luciano.coelho@intel.com \
    --cc=davem@davemloft.net \
    --cc=emmanuel.grumbach@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linuxwifi@intel.com \
    --cc=zhangqilong3@huawei.com \
    /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).