Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1765574imm; Sun, 15 Jul 2018 16:38:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf8yVwGSrjBerPEaMq9H7ApLi0xFi5EibskMEz6o+a/oLFZpEoocAJClo9Yt5gAHIfasZd1 X-Received: by 2002:a17:902:724a:: with SMTP id c10-v6mr14827138pll.64.1531697910618; Sun, 15 Jul 2018 16:38:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531697910; cv=none; d=google.com; s=arc-20160816; b=lfTzE3PC5jBr4MTWPRMqZSdyBf97oGIpvSQf1lBqFxr6KwCtPO0dXsq1B18aiHOYfN pDBUtpCGlLzfgavbDVYvslqbbMJ14hQzDn0eSQqPYZ6RvJUBEgLFc9pqpg0Dav8BNV2F c6d3sZ4T9MUCWJKVrVK2+l3IQc1JymcaU5iOR0YtBi+v0LoW/nmnGSAUHc2oG/JP9qXw cCmpFUIyadpVCNoQLGpRFoJULBt22QLblGGolynPamH5kgpvvJKP6jT0xbJx8qtlx9ZD nAPULuaUPlYN6entLqdcPW08mSj1xxgbvzPivYcY/dli726O55ZEX1Ln0db/oMJ+LOYj WKZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=UAH3cbd+qHnhfoy3jE1kGGFgSimRcDgMwkcKLbpfY2E=; b=ryVoT0n/NjFdZwVuUN+W6BkR10MJAW/0X1EqqJUlx2XoLImW5QNVX/StGsYmHdY7/7 WK9I7BY+hSTNi4Ox27gwS4jQECko3vNJQhIegUxPZnqff4fbYlk1H0Md7HGonom1qnYV 0XDdfQAt9wcbikiQoHWk/jmketSo4QJmzxXtgclnz3I6dv2ImDfW3rc/u819/qOwP+ci VO7nDjjYJXenGm1kfp3De39AjPnABb6ntpR4SZ/8ODhCsKVoF80OTZqF7VomD7rwD7WV oPaIQ6FOQFTyMPSPMBLMeDe20QkxE+18HcgebfuSOF+J7ToFUuuL/CZFIaXZ3qVki98c GSNA== 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 k64-v6si21440721pgd.3.2018.07.15.16.38.16; Sun, 15 Jul 2018 16:38:30 -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 S1728129AbeGPACP (ORCPT + 99 others); Sun, 15 Jul 2018 20:02:15 -0400 Received: from terminus.zytor.com ([198.137.202.136]:43397 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727457AbeGPACO (ORCPT ); Sun, 15 Jul 2018 20:02:14 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w6FNbJ2k922635 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 15 Jul 2018 16:37:19 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w6FNbJMn922624; Sun, 15 Jul 2018 16:37:19 -0700 Date: Sun, 15 Jul 2018 16:37:19 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Sai Praneeth Message-ID: Cc: peterz@infradead.org, hpa@zytor.com, torvalds@linux-foundation.org, ard.biesheuvel@linaro.org, mingo@kernel.org, tglx@linutronix.de, sai.praneeth.prakhya@intel.com, linux-kernel@vger.kernel.org Reply-To: mingo@kernel.org, ard.biesheuvel@linaro.org, torvalds@linux-foundation.org, hpa@zytor.com, peterz@infradead.org, linux-kernel@vger.kernel.org, sai.praneeth.prakhya@intel.com, tglx@linutronix.de In-Reply-To: <20180711094040.12506-3-ard.biesheuvel@linaro.org> References: <20180711094040.12506-3-ard.biesheuvel@linaro.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:efi/core] efi/x86: Use non-blocking SetVariable() for efi_delete_dummy_variable() Git-Commit-ID: 5a58bc1b1edc18a9edff606ec99e6f6b723975f4 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 5a58bc1b1edc18a9edff606ec99e6f6b723975f4 Gitweb: https://git.kernel.org/tip/5a58bc1b1edc18a9edff606ec99e6f6b723975f4 Author: Sai Praneeth AuthorDate: Wed, 11 Jul 2018 11:40:34 +0200 Committer: Ingo Molnar CommitDate: Mon, 16 Jul 2018 00:43:12 +0200 efi/x86: Use non-blocking SetVariable() for efi_delete_dummy_variable() Presently, efi_delete_dummy_variable() uses set_variable() which might block, which the scheduler is rightfully upset about when used from the idle thread, producing this splat: "bad: scheduling from the idle thread!" So, make efi_delete_dummy_variable() use set_variable_nonblocking(), which, as the name suggests, doesn't block. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180711094040.12506-3-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar --- arch/x86/platform/efi/quirks.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c index 36c1f8b9f7e0..6af39dc40325 100644 --- a/arch/x86/platform/efi/quirks.c +++ b/arch/x86/platform/efi/quirks.c @@ -105,12 +105,11 @@ early_param("efi_no_storage_paranoia", setup_storage_paranoia); */ void efi_delete_dummy_variable(void) { - efi.set_variable((efi_char16_t *)efi_dummy_name, - &EFI_DUMMY_GUID, - EFI_VARIABLE_NON_VOLATILE | - EFI_VARIABLE_BOOTSERVICE_ACCESS | - EFI_VARIABLE_RUNTIME_ACCESS, - 0, NULL); + efi.set_variable_nonblocking((efi_char16_t *)efi_dummy_name, + &EFI_DUMMY_GUID, + EFI_VARIABLE_NON_VOLATILE | + EFI_VARIABLE_BOOTSERVICE_ACCESS | + EFI_VARIABLE_RUNTIME_ACCESS, 0, NULL); } /*