Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11967515ybi; Fri, 26 Jul 2019 02:36:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqws7ssk3/NhzqCBwq05LxgaJ7tiNq2i0bwAeJda/eYHrvpX/03ScCo4xCWCCu33sL+guBIx X-Received: by 2002:a62:35c6:: with SMTP id c189mr21326087pfa.96.1564133784907; Fri, 26 Jul 2019 02:36:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564133784; cv=none; d=google.com; s=arc-20160816; b=kZvhX9FFTyTmCtcZ/xyvExQ8pnX3BPKsmqlYCa6OK44Z5HZYD97dX6m3FCJlqkbXSG wLUQkVanwkRaTV1vInCA2X9QCTfS9P1w144PV8O5euCpkkerCXehlroVrU8pxFc7ZC1q 0N7aGgdhO9hSJzVcd+uCbsgvefR2suPJ10lq5H03QQR/4RRyI3QVUb3IyeVUzvx66/gs A3DsqikHHDrZcA/NuIM1TptWm8Rspf5miUmYGKSOOXcZ0HQwAWsVN0u5zPqMpGItNHr2 YZQ7Rqk/nDjStSnhgEAfGWMp4eLaXJZ1kTSBr2HHWjgqRr4rKskNEDSGP3k0mYuGFzN2 ARkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=GGWu3TSiPCTcTZLBByzoO1iGMd05SbBFp7I+iHJor34=; b=tK4dF/4CbX8PCCE80SOxjz9RkN7n0ObB6BiGwg7b3oIX1jjWiz9LwHN+Aae01skfK9 L6rQUYtkHNk/8xv59i7+sKrNCTVW8kywI2D5TNWR1eFv8OYpAHmGWggGNNcAkWLNPbZR ahpgRi26ZfuIgz7JGJgBc1totq96r0RMOeVnktC1WuH6PgBOMtHMQwYpzV2fkU4ZU22N 0o44eiS9JN5kGL4N51sgNFWcIy1TBpP4UJgcsTFlhSYfBcPcnDeqyUrJRBl/YJZdyarB cVPVvs3FXwyW9ndfNwUHi7werCHmxW9i4zceiSZuDJM6pw7begkNrDq/ZYuIR5sqq0fh 5VXA== 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 z5si16920303pjp.101.2019.07.26.02.36.08; Fri, 26 Jul 2019 02:36:24 -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 S1726065AbfGZJfL (ORCPT + 99 others); Fri, 26 Jul 2019 05:35:11 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3174 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725903AbfGZJfL (ORCPT ); Fri, 26 Jul 2019 05:35:11 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 5790F264E7CD27357095; Fri, 26 Jul 2019 17:35:09 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Fri, 26 Jul 2019 17:35:01 +0800 From: Shaokun Zhang To: CC: Nianyao Tang , Thomas Gleixner , Jason Cooper , Marc Zyngier , Shaokun Zhang Subject: [PATCH v2] irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail Date: Fri, 26 Jul 2019 17:32:57 +0800 Message-ID: <1564133577-57866-1-git-send-email-zhangshaokun@hisilicon.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564105905-15410-1-git-send-email-zhangshaokun@hisilicon.com> References: <1564105905-15410-1-git-send-email-zhangshaokun@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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