Received: by 10.213.65.68 with SMTP id h4csp878912imn; Tue, 27 Mar 2018 10:27:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+oI6OCH5k+g7bsXgj8NJuRX3yxv1v7fGZ66xF84ZlMv8K77TMPTvcwXb5NjmB8uT8dDybe X-Received: by 2002:a17:902:5609:: with SMTP id h9-v6mr191513pli.121.1522171623439; Tue, 27 Mar 2018 10:27:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522171623; cv=none; d=google.com; s=arc-20160816; b=rBevYvvC58Z75rURVyO0SjNVwD+OukrBeHSeK/wZFBs9HxTJFl3/4+CNsCyWDXdyTi 1mDXuYWF75BtlBypftzD+dkfymB1JoyG4eVfgsDRjFHjBaRs4VNLVDIttUKBgfRXDUuh WHoa2lhE6LCzz6CHgOpi6Zzdj/enNG2pVelkb9XuyI61MP/9XU434t/hd8t3TG2GTDM6 1iZluXU7d1WKMMEZV6FQxLTBJ2ad0OPW9MG8/qGMmfasvqcSot3jJ8iM0PE7uMFfo2RP C3hq5JljfVzkMNEFotVhLA8E/b0WeER7r29NFCsIBILpcAtMx8i4BkFL9twgfqVbCTTX uACg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ZRbpyWU6cENxrPnD8nqnrvk1F940VVGNYWd9P317CfA=; b=xMjb8buGvyL1kDBeYaUtlq25YKWb5bsue83S3zMj+5Nx0AseJTwt7y3iMYZ/Ii3kWr gjTSfC6u9qo367RwZcTE8kyaBi6ZgGiijweQSUJlIaKY4cw4L2EEXPWgH0yCoov3y0y+ bFcHdGWpiiRn/FDHpuCfZBN5C+xr+THqbfvL68llEnUDYZAMgwdHneoMzIPjjygV14VR JmHg4Z7KyTRMYsgQx7hX6acpt8dbXHMrHNI5/UhlLSy8YDrWxG6JtyhDecqTeYJE1RED dhjtyHPAb52No+J56YuY2ElCB/PqmZIHCmAwvS40VcNUu0OdyDghoVvqFNgtb0S7rJOb V92w== 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 z196si1131433pgz.349.2018.03.27.10.26.48; Tue, 27 Mar 2018 10:27:03 -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 S1754941AbeC0RYb (ORCPT + 99 others); Tue, 27 Mar 2018 13:24:31 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46258 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754893AbeC0QhY (ORCPT ); Tue, 27 Mar 2018 12:37:24 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7D319F8A; Tue, 27 Mar 2018 16:37:23 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Waiman Long , Thomas Gleixner , linux-efi@vger.kernel.org, Dave Hansen , Ard Biesheuvel Subject: [PATCH 4.14 081/101] x86/efi: Free efi_pgd with free_pages() Date: Tue, 27 Mar 2018 18:27:53 +0200 Message-Id: <20180327162755.041436623@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162749.993880276@linuxfoundation.org> References: <20180327162749.993880276@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Waiman Long commit 06ace26f4e6fcf747e890a39193be811777a048a upstream. The efi_pgd is allocated as PGD_ALLOCATION_ORDER pages and therefore must also be freed as PGD_ALLOCATION_ORDER pages with free_pages(). Fixes: d9e9a6418065 ("x86/mm/pti: Allocate a separate user PGD") Signed-off-by: Waiman Long Signed-off-by: Thomas Gleixner Cc: linux-efi@vger.kernel.org Cc: Dave Hansen Cc: Ard Biesheuvel Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1521746333-19593-1-git-send-email-longman@redhat.com Signed-off-by: Greg Kroah-Hartman --- arch/x86/platform/efi/efi_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/platform/efi/efi_64.c +++ b/arch/x86/platform/efi/efi_64.c @@ -227,7 +227,7 @@ int __init efi_alloc_page_tables(void) if (!pud) { if (CONFIG_PGTABLE_LEVELS > 4) free_page((unsigned long) pgd_page_vaddr(*pgd)); - free_page((unsigned long)efi_pgd); + free_pages((unsigned long)efi_pgd, PGD_ALLOCATION_ORDER); return -ENOMEM; }