mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: lyl2019@mail.ustc.edu.cn
To: "Lv Yunlong" <lyl2019@mail.ustc.edu.cn>
Cc: buytenh@wantstofly.org, kvalo@codeaurora.org,
	davem@davemloft.net, kuba@kernel.org, gustavoars@kernel.org,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wireless: marvell: mwl8k: Fix a double Free in mwl8k_probe_hw
Date: Wed, 14 Apr 2021 00:23:12 +0800 (GMT+08:00)	[thread overview]
Message-ID: <56a96726.42ca6.178cc0b3e40.Coremail.lyl2019@mail.ustc.edu.cn> (raw)
In-Reply-To: <20210402182627.4256-1-lyl2019@mail.ustc.edu.cn>


Dear maintainers,
    
     I'm sorry to disturb you, but this patch has not been reviewed for more than a week.
     Could you please help to review this patch? It will not take you a lot time.

Sincerely.

> -----原始邮件-----
> 发件人: "Lv Yunlong" <lyl2019@mail.ustc.edu.cn>
> 发送时间: 2021-04-03 02:26:27 (星期六)
> 收件人: buytenh@wantstofly.org, kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org, gustavoars@kernel.org
> 抄送: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Lv Yunlong" <lyl2019@mail.ustc.edu.cn>
> 主题: [PATCH] wireless: marvell: mwl8k: Fix a double Free in mwl8k_probe_hw
> 
> In mwl8k_probe_hw, hw->priv->txq is freed at the first time by
> dma_free_coherent() in the call chain:
> if(!priv->ap_fw)->mwl8k_init_txqs(hw)->mwl8k_txq_init(hw, i).
> 
> Then in err_free_queues of mwl8k_probe_hw, hw->priv->txq is freed
> at the second time by mwl8k_txq_deinit(hw, i)->dma_free_coherent().
> 
> My patch set txq->txd to NULL after the first free to avoid the
> double free.
> 
> Fixes: a66098daacee2 ("mwl8k: Marvell TOPDOG wireless driver")
> Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
> ---
>  drivers/net/wireless/marvell/mwl8k.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c
> index c9f8c056aa51..84b32a5f01ee 100644
> --- a/drivers/net/wireless/marvell/mwl8k.c
> +++ b/drivers/net/wireless/marvell/mwl8k.c
> @@ -1473,6 +1473,7 @@ static int mwl8k_txq_init(struct ieee80211_hw *hw, int index)
>  	if (txq->skb == NULL) {
>  		dma_free_coherent(&priv->pdev->dev, size, txq->txd,
>  				  txq->txd_dma);
> +		txq->txd = NULL;
>  		return -ENOMEM;
>  	}
>  
> -- 
> 2.25.1
> 

  reply	other threads:[~2021-04-13 16:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02 18:26 Lv Yunlong
2021-04-13 16:23 ` lyl2019 [this message]
2021-04-18  6:35 ` Kalle Valo

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=56a96726.42ca6.178cc0b3e40.Coremail.lyl2019@mail.ustc.edu.cn \
    --to=lyl2019@mail.ustc.edu.cn \
    --cc=buytenh@wantstofly.org \
    --cc=davem@davemloft.net \
    --cc=gustavoars@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®