Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11950599ybi; Fri, 26 Jul 2019 02:19:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxVj+HTo63ZMZBNszIYhgMXQE2HnW8GEQ9PwXM+yMl812Iqy4UYbNglfLBYZCS23uHMxl3 X-Received: by 2002:aa7:8619:: with SMTP id p25mr882252pfn.220.1564132792789; Fri, 26 Jul 2019 02:19:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564132792; cv=none; d=google.com; s=arc-20160816; b=RXXRFg4aMU0h+JER4cOb5jlm7dLMjflSFp8qfWrNctId04Zq01DjEa4OB3KMI2O1EC fxTEdCw+nAz7G0Kd8fT3GAQvQ2n2CATJG6FbLa5NexepOdVA+Tk/iYmHpCY+xSzv/uJg 1UeECoMRY+AZoi7VolHTTebA69wjkseAcAnr8zJhobhmoLfhBh6MwPcXKNYxU7tp7NUz np227giQyLxXz4pexI0K7OH2ogc7HNK4n7p2aNGpo6CoxxfJzHYg8RpFsEwPzP/C9bUp VhQOOPflFk9XsDOgUO81kDnx5nRH6JYkU74X2kvgk1zMsqfZTDYkPE1j10ybfpvxZqeX Ku7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=rmgWzbAC4aammZEaxtLTtMjGgED4pRkQOqmWoMOrXz4=; b=bx4vephbbprFMk+GFhoHjgZAvkVEx+zSxP/Bd7tdToMnI8XyXWOnS2cVXMC2LzFTPl z+lo+i1+TWxQpIhtSlWtZWeUjK7p8UJ4twkKhs1ucyQ34MDpI/5O1yTGsgcXBYvcYYyc prwbOg75h6HXINHL7EBuLeeW0Ynr98+wzuWVofX1mst10tfqnhkMQUQUbDb5BXB5EiPd Ulc4jjQ9DC/0sH23J50t9TDpxCCo71YKtDJazjeXf0lWFkhXMwFKY783EEDY4oNVQVhL ym7gmPCnPUPdRByxa9ZpeiZISjy+K49BuMKE35kFvpkClxKMZENr+igLIU45q/znsFw6 3p1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id go12si16469946plb.251.2019.07.26.02.19.37; Fri, 26 Jul 2019 02:19:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726000AbfGZJSt (ORCPT + 99 others); Fri, 26 Jul 2019 05:18:49 -0400 Received: from foss.arm.com ([217.140.110.172]:40018 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbfGZJSt (ORCPT ); Fri, 26 Jul 2019 05:18:49 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BC2D6344; Fri, 26 Jul 2019 02:18:48 -0700 (PDT) Received: from why (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BCBA93F71A; Fri, 26 Jul 2019 02:18:47 -0700 (PDT) Date: Fri, 26 Jul 2019 10:18:44 +0100 From: Marc Zyngier To: Shaokun Zhang Cc: , Nianyao Tang , Thomas Gleixner , Jason Cooper Subject: Re: [PATCH] irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail Message-ID: <20190726101844.79cb10b5@why> In-Reply-To: <1564105905-15410-1-git-send-email-zhangshaokun@hisilicon.com> References: <1564105905-15410-1-git-send-email-zhangshaokun@hisilicon.com> Organization: ARM Ltd X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 Jul 2019 09:51:45 +0800 Shaokun Zhang wrote: > From: Nianyao Tang > > In its_vpe_init, when its_alloc_vpe_table fails, we should free > vpt_page allocated just before, instead of vpe->vpt_page. > Let's fix it. > > Cc: Thomas Gleixner > Cc: Jason Cooper > Cc: Marc Zyngier > Signed-off-by: Nianyao Tang > --- > drivers/irqchip/irq-gic-v3-its.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c > index 730fbe0..1b5c367 100644 > --- a/drivers/irqchip/irq-gic-v3-its.c > +++ b/drivers/irqchip/irq-gic-v3-its.c > @@ -3010,7 +3010,7 @@ static int its_vpe_init(struct its_vpe *vpe) > > if (!its_alloc_vpe_table(vpe_id)) { > its_vpe_id_free(vpe_id); > - its_free_pending_table(vpe->vpt_page); > + its_free_pending_table(vpt_page); > return -ENOMEM; > } > Oops, well caught. Please repost this patch with your own SoB added though, as you're posting the patch on behalf of someone else. Thanks, M. -- Without deviation from the norm, progress is not possible.