[v2] ath10k: fix memory leak in rx ring buffer allocation

Kalle Valo kvalo at qca.qualcomm.com
Tue Aug 8 04:07:13 PDT 2017

Rakesh Pillai <pillair at codeaurora.org> wrote:

> The rx ring buffers are added to a hash table if
> firmware support full rx reorder. If the full rx
> reorder support flag is not set before allocating
> the rx ring buffers, none of the buffers are added
> to the hash table.
> There is a race condition between rx ring refill and
> rx buffer replenish from napi poll. The interrupts are
> enabled in hif start, before the rx ring is refilled during init.
> We replenish buffers from napi poll due to the interrupts which
> get enabled after hif start. Hence before the entire rx ring is
> refilled during the init, the napi poll replenishes a few buffers
> in steps of 100 buffers per attempt. During this rx ring replenish
> from napi poll, the rx reorder flag has not been set due to which
> the replenished buffers are not added to the hash table
> Set the rx full reorder support flag before we allocate
> the rx ring buffer to avoid the memory leak.
> Signed-off-by: Rakesh Pillai <pillair at qti.qualcomm.com>
> Signed-off-by: Kalle Valo <kvalo at qca.qualcomm.com>

Patch applied to ath-next branch of ath.git, thanks.

f35a7f91f66a ath10k: fix memory leak in rx ring buffer allocation



More information about the ath10k mailing list