Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp72623ybi; Fri, 26 Jul 2019 06:19:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+Fdco6FfXS0kFw7x/Xh4JsGmPv7h90yEfPWpm4dvk4eO046u/nsKu4dhC6lUZ6KQprsp8 X-Received: by 2002:a62:2d3:: with SMTP id 202mr22551948pfc.131.1564147192349; Fri, 26 Jul 2019 06:19:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564147192; cv=none; d=google.com; s=arc-20160816; b=dIbL48BmXSiQCIqc/zwOl5FNKK9+/jWWwUZPUrndyxtR/OCEHwSSWgNaCJlWA80hB4 Cxgx5rLF4iPCE2al/SyVw6kZkHysMq/5cNKDRn3vikCHQIuSPyxE5B7nMrtlZ3nhgQKg X9vfNClnMk0zCq0FfJLaPZZBAhbkSEgivzoI/GXwb5CQ96BmBvnDZoizB4Orv8sihJZ7 EIUdeU89RxdRO96YP+vmgjcoZ0psfIsxWgNfiPP65uCO0QI1dZbK1xzL8nX0qOVnHjVq MGtEANXA4FQONK83rTwq1xOBWz2VQl4WnvWflZkedhcqRy43wC21r+w/beIMKEhAp0UK u6uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:user-agent :references:in-reply-to:subject:cc:to:from:message-id:date; bh=nJ7ScMS9W5PzMjSpYfSx0FrfbWxEUphU4uuh6b1bOOQ=; b=Md+m9Bgxu+eMtTcwAA83hWrz2qBQbzwaLimQnVpjECng+cMa7hr1pf1aqEBTW1iFyM SRPhwlDpfqlBWps+4V3B7ND288TtumVbgXeePlz7VqnZAo2DGBUNtaGryhvAFIswui92 t1Pu4nu1c1coaB42EbexXf8MZE2u1euRtGiHA8tWlJXBdT2LlTUpuEYBotq3QEboaIrj 5MwhkjIBnKIHHc0EYyi0YW5dZhqU/02Lm+4bIpDk8vaW6EILP2xwij4uoE8sd9gpkZt8 fw89EQRGruAPzLgxa2H6f3/VXQ6RZv5I5e2Jbx3GLUyu/rRl1ic5+DWxVE9RtYk6/zlC 6i2A== 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 k8si20847329pgt.548.2019.07.26.06.19.36; Fri, 26 Jul 2019 06: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 S1726958AbfGZNR5 (ORCPT + 99 others); Fri, 26 Jul 2019 09:17:57 -0400 Received: from foss.arm.com ([217.140.110.172]:43406 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726265AbfGZNR5 (ORCPT ); Fri, 26 Jul 2019 09:17:57 -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 691C2337; Fri, 26 Jul 2019 06:17:54 -0700 (PDT) Received: from big-swifty.misterjones.org (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3D8AE3F694; Fri, 26 Jul 2019 06:17:53 -0700 (PDT) Date: Fri, 26 Jul 2019 14:17:51 +0100 Message-ID: <868sslndds.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Shaokun Zhang Cc: , Nianyao Tang , Thomas Gleixner , Jason Cooper Subject: Re: [PATCH v2] irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail In-Reply-To: <1564133577-57866-1-git-send-email-zhangshaokun@hisilicon.com> References: <1564105905-15410-1-git-send-email-zhangshaokun@hisilicon.com> <1564133577-57866-1-git-send-email-zhangshaokun@hisilicon.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 Jul 2019 10:32:57 +0100, 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 > Signed-off-by: Shaokun Zhang > --- > 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 730fbe0e2a9d..1b5c3672aea2 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; > } > > -- > 2.7.4 > Applied, thanks. M. -- Jazz is not dead, it just smells funny.