All of lore.kernel.org
 help / color / mirror / Atom feed
From: bgodavar@codeaurora.org
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	linux-bluetooth@vger.kernel.org, kernel-janitors@vger.kernel.org,
	hemantg@codeaurora.org
Subject: Re: [PATCH -next] Bluetooth: hci_qca: Use vfree() instead of kfree()
Date: Wed, 08 Jan 2020 12:43:09 +0000	[thread overview]
Message-ID: <79e6ab011f21bc6edad81fc8a01aaf9a@codeaurora.org> (raw)
In-Reply-To: <20200108035931.51209-1-weiyongjun1@huawei.com>

On 2020-01-08 09:29, Wei Yongjun wrote:
> Use vfree() instead of kfree() to free vmalloc()
> allocated data.
> 
> Fixes: d841502c79e3 ("Bluetooth: hci_qca: Collect controller memory
> dump during SSR")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/bluetooth/hci_qca.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index 9392cc7f9908..a17260641283 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -529,7 +529,7 @@ static void hci_memdump_timeout(struct timer_list 
> *t)
>  	bt_dev_err(hu->hdev, "clearing allocated memory due to memdump 
> timeout");
>  	/* Inject hw error event to reset the device and driver. */
>  	hci_reset_dev(hu->hdev);
> -	kfree(memdump_buf);
> +	vfree(memdump_buf);
>  	kfree(qca_memdump);
>  	qca->memdump_state = QCA_MEMDUMP_TIMEOUT;
>  	del_timer(&qca->memdump_timer);
> @@ -1437,7 +1437,7 @@ static void qca_wait_for_dump_collection(struct
> hci_dev *hdev)
>  		bt_dev_err(hu->hdev, "Clearing the buffers due to timeout");
>  		if (qca_memdump)
>  			memdump_buf = qca_memdump->memdump_buf_tail;
> -		kfree(memdump_buf);
> +		vfree(memdump_buf);
>  		kfree(qca_memdump);
>  		qca->memdump_state = QCA_MEMDUMP_TIMEOUT;
>  		del_timer(&qca->memdump_timer);

Reviewed-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>

WARNING: multiple messages have this Message-ID (diff)
From: bgodavar@codeaurora.org
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	linux-bluetooth@vger.kernel.org, kernel-janitors@vger.kernel.org,
	hemantg@codeaurora.org
Subject: Re: [PATCH -next] Bluetooth: hci_qca: Use vfree() instead of kfree()
Date: Wed, 08 Jan 2020 18:01:09 +0530	[thread overview]
Message-ID: <79e6ab011f21bc6edad81fc8a01aaf9a@codeaurora.org> (raw)
In-Reply-To: <20200108035931.51209-1-weiyongjun1@huawei.com>

On 2020-01-08 09:29, Wei Yongjun wrote:
> Use vfree() instead of kfree() to free vmalloc()
> allocated data.
> 
> Fixes: d841502c79e3 ("Bluetooth: hci_qca: Collect controller memory
> dump during SSR")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/bluetooth/hci_qca.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index 9392cc7f9908..a17260641283 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -529,7 +529,7 @@ static void hci_memdump_timeout(struct timer_list 
> *t)
>  	bt_dev_err(hu->hdev, "clearing allocated memory due to memdump 
> timeout");
>  	/* Inject hw error event to reset the device and driver. */
>  	hci_reset_dev(hu->hdev);
> -	kfree(memdump_buf);
> +	vfree(memdump_buf);
>  	kfree(qca_memdump);
>  	qca->memdump_state = QCA_MEMDUMP_TIMEOUT;
>  	del_timer(&qca->memdump_timer);
> @@ -1437,7 +1437,7 @@ static void qca_wait_for_dump_collection(struct
> hci_dev *hdev)
>  		bt_dev_err(hu->hdev, "Clearing the buffers due to timeout");
>  		if (qca_memdump)
>  			memdump_buf = qca_memdump->memdump_buf_tail;
> -		kfree(memdump_buf);
> +		vfree(memdump_buf);
>  		kfree(qca_memdump);
>  		qca->memdump_state = QCA_MEMDUMP_TIMEOUT;
>  		del_timer(&qca->memdump_timer);

Reviewed-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>

  reply	other threads:[~2020-01-08 12:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08  3:59 [PATCH -next] Bluetooth: hci_qca: Use vfree() instead of kfree() Wei Yongjun
2020-01-08  3:59 ` Wei Yongjun
2020-01-08 12:31 ` bgodavar [this message]
2020-01-08 12:43   ` bgodavar
2020-01-08 20:46 ` Marcel Holtmann
2020-01-08 20:46   ` Marcel Holtmann

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=79e6ab011f21bc6edad81fc8a01aaf9a@codeaurora.org \
    --to=bgodavar@codeaurora.org \
    --cc=hemantg@codeaurora.org \
    --cc=johan.hedberg@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=weiyongjun1@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.