Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752921AbbG0K2f (ORCPT ); Mon, 27 Jul 2015 06:28:35 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42584 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751090AbbG0K2c (ORCPT ); Mon, 27 Jul 2015 06:28:32 -0400 From: Kalle Valo To: Mike Looijmans 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 References: <1437975813-3285-1-git-send-email-mike.looijmans@topic.nl> Date: Mon, 27 Jul 2015 13:28:26 +0300 In-Reply-To: <1437975813-3285-1-git-send-email-mike.looijmans@topic.nl> (Mike Looijmans's message of "Mon, 27 Jul 2015 07:43:33 +0200") Message-ID: <87wpxlao8l.fsf@kamboji.qca.qualcomm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1617 Lines: 41 Mike Looijmans 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 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/