netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Looijmans <mike.looijmans@topic.nl>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: <linux-wireless@vger.kernel.org>, <khoroshilov@ispras.ru>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH] rsi: Fix failure to load firmware after memory leak fix and fix the leak
Date: Tue, 28 Jul 2015 07:53:21 +0200	[thread overview]
Message-ID: <55B718D1.2030803@topic.nl> (raw)
In-Reply-To: <87wpxlao8l.fsf@kamboji.qca.qualcomm.com>

On 27-07-15 12:28, Kalle Valo wrote:
> Mike Looijmans <mike.looijmans@topic.nl> writes:
>
>> Fixes commit eae79b4f3e82ca63a53478a161b190a0d38fe526 ("rsi: fix memory leak
>> in rsi_load_ta_instructions()") which stopped the driver from functioning.
>
> You can abbreviate the commit id:
>
> Fixes commit eae79b4f3e82 ("rsi: fix memory leak in
> rsi_load_ta_instructions()") which stopped the driver from functioning.
>
>> Firmware data has been allocated using vmalloc(), resulting in memory
>> that cannot be used for DMA. Hence the firmware was first copied to a
>> buffer allocated with kmalloc() in the original code. This patch reverts
>> the commit and only calls "kfree()" to release the buffer after sending
>> the data. This fixes the memory leak without breaking the driver.
>>
>> Add a comment to the kmemdup() calls to explain why this is done.
>>
>> Tested on a Topic Miami-Florida board which contains the rsi SDIO chip.
>>
>> Also added the same kfree() call to the USB glue driver. This was not
>> tested on actual hardware though, as I only have the SDIO version.
>>
>> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
>
> Add this before Signed-off-by line:
>
> Fixes: eae79b4f3e82 ("rsi: fix memory leak in rsi_load_ta_instructions()")
>
>> Cc: stable@vger.kernel.org
>
> Also no need to send email to stable@vger.kernel.org list, this line is
> enough and the stable team will pick the commit automatically.

I wondered why that happened, and just noticed that git send-email 
automatically added this to the recipients. So it happened for v2 as well, 
sorry for that.



Kind regards,

Mike Looijmans
System Expert

TOPIC Embedded Products
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
Telefax: +31 (0) 499 33 69 70
E-mail: mike.looijmans@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail

  reply	other threads:[~2015-07-28  5:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-27  5:43 [PATCH] rsi: Fix failure to load firmware after memory leak fix and fix the leak Mike Looijmans
2015-07-27  7:55 ` Alexey Khoroshilov
2015-07-27 10:28 ` Kalle Valo
2015-07-28  5:53   ` Mike Looijmans [this message]
2015-07-28  5:51 ` [PATCH v2] " Mike Looijmans
2015-07-31  6:23   ` [v2] rsi: Fix failure to load firmware after memory leak fix and fixthe leak 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=55B718D1.2030803@topic.nl \
    --to=mike.looijmans@topic.nl \
    --cc=khoroshilov@ispras.ru \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stable@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;
as well as URLs for NNTP newsgroup(s).