Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11546113ybi; Thu, 25 Jul 2019 18:56:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAqXd9XNQe7GYg5PCfXHQbD9e81mG1U+FoU7CfDyIHsGePfpCz3+bLZ8UE2Bajsx2xIfXL X-Received: by 2002:a17:902:a607:: with SMTP id u7mr94368477plq.43.1564106183198; Thu, 25 Jul 2019 18:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564106183; cv=none; d=google.com; s=arc-20160816; b=xvtz4tEb15z5Kl6FL5cxIBvMMjKAjABpPwrrt3G+nZh73LIdxfvY89V/xMK9oewYlE wN9RkwSiRmPMeulboIuiqpBhwd0gsMWaz96JbEDCn+vIPF1fOlFMCJELgmB35AA0VJBy CrOoykmCkBcnBTIwKlvp4Q+sdTDHBGnHjqivJzKfkMrZ/PILh6F0wPC65X23O11BAFvc 3ueotNMZGuyBLBRg9wz9LdM3nF1pSaC7If13e2WiwTlsFxczHvjRkTlST7o3eOIuh6/d 3dRU/cR0xczaUtgUF5HzUT45rUEFQdBIdO9dsYhlXyDBG8tsgY5oGGlbLFQ6zrol4Rqa vtwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=7KVWt4TJcz2Kh2oe4T4s0I53GoiENA/THHog3FtEU8o=; b=PH2jWT5uNn2sOtRdeZKiv4hZm+MuOEV8+Mig+BthPYG9h2qWXIalLDmm6Nk4Sc+fr+ LdYzp/H2EvERrGubihW8eVLdq4d99i6bve+V1yWHAHgu/X2jgBEjnd3ARoFhXgu+OycQ p/vuI1ljGHdhwMrJBScv9fd+PiysIHgeYd1fDBtFOvkZoj+h8CvyW4Dl0ik14xjz8Zlj ysfJZZ14a4CH+kCl+aGBzNLuaqhBkg+TLMk6u282SsxgW+mUfKxboQH3lJnNBIrZ2f8x U4KLz1I6PVbKamHVhyILxuJ6BjuDGK2bC7QVzUs8JybKpIu1y24dKqnak1uaRtcyxrCL 3qNg== 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 a63si17649449pge.113.2019.07.25.18.56.08; Thu, 25 Jul 2019 18:56:23 -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 S1725955AbfGZByZ (ORCPT + 99 others); Thu, 25 Jul 2019 21:54:25 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:47066 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725800AbfGZByZ (ORCPT ); Thu, 25 Jul 2019 21:54:25 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 91C18C84CB6607FECFED; Fri, 26 Jul 2019 09:54:23 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Fri, 26 Jul 2019 09:54:14 +0800 From: Shaokun Zhang To: CC: Nianyao Tang , Thomas Gleixner , Jason Cooper , Marc Zyngier Subject: [PATCH] irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail Date: Fri, 26 Jul 2019 09:51:45 +0800 Message-ID: <1564105905-15410-1-git-send-email-zhangshaokun@hisilicon.com> X-Mailer: git-send-email 2.7.4 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 --- 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; } -- 2.7.4