From: Kalle Valo <kvalo@codeaurora.org>
To: Mike Looijmans <mike.looijmans@topic.nl>
Cc: linux-wireless@vger.kernel.org, khoroshilov@ispras.ru,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Mike Looijmans <mike.looijmans@topic.nl>,
stable@vger.kernel.org
Subject: Re: [v2] rsi: Fix failure to load firmware after memory leak fix and fixthe leak
Date: Fri, 31 Jul 2015 06:23:12 +0000 (UTC) [thread overview]
Message-ID: <20150731062312.CF880140A4E@smtp.codeaurora.org> (raw)
In-Reply-To: <1438062661-3173-1-git-send-email-mike.looijmans@topic.nl>
> 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, and abort
> if memory allocation fails.
>
> 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.
>
> Fixes: eae79b4f3e82 ("rsi: fix memory leak in rsi_load_ta_instructions()")
> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
> Cc: stable@vger.kernel.org
Thanks, applied to wireless-drivers.git.
Kalle Valo
prev parent reply other threads:[~2015-07-31 6:23 UTC|newest]
Thread overview: 7+ 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 5:43 ` Mike Looijmans
2015-07-27 7:55 ` Alexey Khoroshilov
2015-07-27 10:28 ` Kalle Valo
2015-07-28 5:53 ` Mike Looijmans
2015-07-28 5:51 ` [PATCH v2] " Mike Looijmans
2015-07-31 6:23 ` Kalle Valo [this message]
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=20150731062312.CF880140A4E@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=khoroshilov@ispras.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mike.looijmans@topic.nl \
--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 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.