Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11956165ybi; Fri, 26 Jul 2019 02:25:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjbrYwbw1T8WwpMPierndhBqMAundOapT6ivL+amXwmAIiLimC3XQTidFWneKa1Ko294Oi X-Received: by 2002:a63:f443:: with SMTP id p3mr9183856pgk.345.1564133137902; Fri, 26 Jul 2019 02:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564133137; cv=none; d=google.com; s=arc-20160816; b=H/m8cnKNtB38y1gWk+UyDhaE8iv+5vHXGrjtTDuGPu+TM+pw6H963BHbJaK5ik9iCu Hn29FChPY9SoIMPffYVIkS7BlkKAre65p94CDrZHWgK3KDWH4zktXskMoUqhwPnAGOvL CZ9eb5IYZUhl/EPiqpbQNfW8tdVtqtrV1HEDgA/rJslCSpHhVhV9kOZGH71rS3BXacqE wg/pDtjPNt72b8mkxivlOp5bx190AwxWkib/zNo8uAjzI4QW0TPfAX1OD58nJNvmAaMg NLJzA1x8suN99vdTU+iPm0bTJJKp2T0BCnZuURDJl1QrI6HAp+UCRiRq/49UCQKlIMZB XVCg== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=/YB8g02zOgacFh6aHbTi3yrparRHXsO4GHhS7pxGi+A=; b=tjBM5XQoJF9xSamnPAJ/b1D7AccPdyP6MZ25aF00sYFRrseKIeqylha+Ct7yY6UQOT xJJe9Ahdi/zKE7HEOxF+dBYNPMf1WLqhwvfm0wFGcon0Bhccsj1jSeEhzgNwrWjzdhSD RYAL/itax5kY1fzKZET7e6oI4RrEORyYY75r7/8caF0DlDIrakPLzfs2E/PeM2ionVx+ 3VUT62GX+xr0qvDvv+6aBQuS9m9/nYAdL81YExqx2LlkfXeggiKfVa3FnL9XAjOuwri2 M/+FZiVHiKztbZqViwhIrn04yzQmR3WR4EfZf641XmQSK30i51eHGmMu3/HOUFs3IcO0 LliA== 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 m12si18889305pjq.60.2019.07.26.02.25.23; Fri, 26 Jul 2019 02:25:37 -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 S1726190AbfGZJYV (ORCPT + 99 others); Fri, 26 Jul 2019 05:24:21 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:35880 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725903AbfGZJYV (ORCPT ); Fri, 26 Jul 2019 05:24:21 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 67D8CFC61B5C23688CC1; Fri, 26 Jul 2019 17:24:19 +0800 (CST) Received: from [127.0.0.1] (10.74.221.148) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Fri, 26 Jul 2019 17:24:13 +0800 Subject: Re: [PATCH] irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail To: Marc Zyngier References: <1564105905-15410-1-git-send-email-zhangshaokun@hisilicon.com> <20190726101844.79cb10b5@why> CC: , Nianyao Tang , Thomas Gleixner , Jason Cooper From: Zhangshaokun Message-ID: Date: Fri, 26 Jul 2019 17:24:13 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20190726101844.79cb10b5@why> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.74.221.148] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, On 2019/7/26 17:18, Marc Zyngier wrote: > 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 your reminder and I will do it in v2 version. Shaokun > Thanks, > > M. >