Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1192936 > unrolled thread

Re: [PATCH] rsi: Fix failure to load firmware after memory leak fix and fix the leak

Started byKalle Valo <kvalo@codeaurora.org>
First post2015-07-27 12:30 +0200
Last post2015-07-28 08:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] rsi: Fix failure to load firmware after memory leak fix and fix the leak Kalle Valo <kvalo@codeaurora.org> - 2015-07-27 12:30 +0200
    Re: [PATCH] rsi: Fix failure to load firmware after memory leak fix  and fix the leak Mike Looijmans <mike.looijmans@topic.nl> - 2015-07-28 08:00 +0200

#1192936 — Re: [PATCH] rsi: Fix failure to load firmware after memory leak fix and fix the leak

FromKalle Valo <kvalo@codeaurora.org>
Date2015-07-27 12:30 +0200
SubjectRe: [PATCH] rsi: Fix failure to load firmware after memory leak fix and fix the leak
Message-ID<pQNPs-7dH-17@gated-at.bofh.it>
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.

-- 
Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1193795 — Re: [PATCH] rsi: Fix failure to load firmware after memory leak fix and fix the leak

FromMike Looijmans <mike.looijmans@topic.nl>
Date2015-07-28 08:00 +0200
SubjectRe: [PATCH] rsi: Fix failure to load firmware after memory leak fix and fix the leak
Message-ID<pR65I-d2-5@gated-at.bofh.it>
In reply to#1192936
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





--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web