From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756212AbcBBQqW (ORCPT ); Tue, 2 Feb 2016 11:46:22 -0500 Received: from foss.arm.com ([217.140.101.70]:56898 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754345AbcBBQqV (ORCPT ); Tue, 2 Feb 2016 11:46:21 -0500 Subject: Re: [PATCH v3] irqchip: gicv3-its: Fix memory leak in its_free_tables() To: Shanker Donthineni , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <1454379584-21772-1-git-send-email-shankerd@codeaurora.org> Cc: Jason Cooper , Vikram Sethi From: Marc Zyngier Organization: ARM Ltd Message-ID: <56B0DD5A.3080500@arm.com> Date: Tue, 2 Feb 2016 16:46:18 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: <1454379584-21772-1-git-send-email-shankerd@codeaurora.org> 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 On 02/02/16 02:19, Shanker Donthineni wrote: > The current ITS driver has a memory leak in its_free_tables(). It > happens on tear down path of the driver when its_probe() call fails. > its_free_tables() should free the exact number of pages that have > been allocated, not just a single page as current code does. > > This patch records the memory size for each ITS_BASERn at the time of > page allocation and uses the same size information when freeing pages > to fix the issue. > > Signed-off-by: Shanker Donthineni Acked-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny...