Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753367AbbETLda (ORCPT ); Wed, 20 May 2015 07:33:30 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:6150 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752868AbbETLd2 (ORCPT ); Wed, 20 May 2015 07:33:28 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Wed, 20 May 2015 04:30:36 -0700 Message-ID: <555C7102.8060207@nvidia.com> Date: Wed, 20 May 2015 12:33:22 +0100 From: Jon Hunter User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Alexandre Courbot , Laxman Dewangan , Greg Kroah-Hartman , "Jiri Slaby" CC: , , Subject: Re: [PATCH] serial: tegra: Fix memory leak on DMA setup failure References: <1432120864-23916-1-git-send-email-jonathanh@nvidia.com> <555C6F38.50603@nvidia.com> In-Reply-To: <555C6F38.50603@nvidia.com> X-Originating-IP: [10.21.134.107] X-ClientProxiedBy: UKMAIL102.nvidia.com (10.26.138.15) To UKMAIL101.nvidia.com (10.26.138.13) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 827 Lines: 25 On 20/05/15 12:25, Jon Hunter wrote: > > On 20/05/15 12:21, Jon Hunter wrote: >> If the call to dmaengine_slave_config() fails, then the DMA buffer will >> not be freed/unmapped. Fix this by moving the code that stores the >> address of the buffer in the tegra_uart_port structure to before the >> call to dmaengine_slave_config(). > > By the way, just to be clear, I did try to fix this before [1], but > failed :-( To be doubly clear, this is targeted to be applied on top of the previous patch [1] which is now in linux-next. Jon > [1] https://lkml.org/lkml/2015/5/5/802 -- 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/