Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2962676imm; Mon, 28 May 2018 21:03:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZre1oMiqNZesuBugoCR00NaFYCK7WE+l8k4W0nfYs4bnBMHOz9rwStTVW8N7TrBNfrT2tr0 X-Received: by 2002:a17:902:125:: with SMTP id 34-v6mr16376810plb.42.1527566630438; Mon, 28 May 2018 21:03:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527566630; cv=none; d=google.com; s=arc-20160816; b=XtDzjkYJCvMmzyVjrpnBJ1j7rykMllHMsy5fs/vKvAuLK+7HvQWWJZeLQWky1B6o59 vyVsZnqGbFUS4X/R9BQ86AmF2MklYVujpYg8AzislHvin3OAN1e3WyRKUhOEWr9GHH4X AoC1lQEK5FELQS9MfcCa7dCxBtlXJVn1qZBaf/qXLYjbmfODfY9AZSO1qQoKSL0zAdEC ANwSepzZBsozOHmEIRSb8dk7c5zS7Og7NvuhHSyk91nBdR9cFup92/MKjiervkhqsPr9 G/1NnkpI4fd7BC56SvdRkQz9MxXJsvVivVXfHkpKjOegcr6BFu6DB25NryBSweI+8zGh 91Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=7uzcY/IrSVgnKPgMWewHEBIoQIPDjDHzGkD5mf7APQI=; b=Xnp9qAlRqP4PGTvCQQJJnlOqxdr+ydYSjZDp5gPetZ3LXRTKRvVjX3BxGpJR3IYyx8 yuLJmpUcQx2HH0RkQ6A0s3m7D1ocptzrqi+lxdUngVQ0lOyF8LxSz+uCkvwYgVb31c3W 8zVRuFiskXZLq0x6NknRlvA4eP8aU2SxyTm0MVvoJRQILo+AhSaxfPKC35ATVomrQH36 fAHJN7WaLOlABNRtLty3nRCBkw4hxdsqcVsWmcbNSE/+baAnUMMMR9qV0bwOzFpdTndV MuQNuVIPBCfxJpzObaLvsGzCN2Le0YxwsIiQuZPxl9SFDhxROpPYJoOLCl6DcPHrGGFO bnWQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y139-v6si32469746pfc.163.2018.05.28.21.03.35; Mon, 28 May 2018 21:03:50 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756108AbeE2CVG (ORCPT + 99 others); Mon, 28 May 2018 22:21:06 -0400 Received: from mga01.intel.com ([192.55.52.88]:58221 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753829AbeE2CVA (ORCPT ); Mon, 28 May 2018 22:21:00 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2018 19:20:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,454,1520924400"; d="scan'208";a="232484736" Received: from sai-dev-mach.sc.intel.com ([143.183.140.145]) by fmsmga005.fm.intel.com with ESMTP; 28 May 2018 19:20:59 -0700 From: Sai Praneeth Prakhya To: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sai Praneeth , Lee Chun-Yi , Borislav Petkov , Tony Luck , Will Deacon , Dave Hansen , Mark Rutland , Bhupesh Sharma , Naresh Bhat , Ricardo Neri , Peter Zijlstra , Ravi Shankar , Matt Fleming , Dan Williams , Ard Biesheuvel , Miguel Ojeda Subject: [PATCH V5 1/3] x86/efi: Make efi_delete_dummy_variable() use set_variable_nonblocking() instead of set_variable() Date: Mon, 28 May 2018 19:21:02 -0700 Message-Id: <1527560464-19466-2-git-send-email-sai.praneeth.prakhya@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1527560464-19466-1-git-send-email-sai.praneeth.prakhya@intel.com> References: <1527560464-19466-1-git-send-email-sai.praneeth.prakhya@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sai Praneeth Presently, efi_delete_dummy_variable() uses set_variable() which might block and hence kernel prints stack trace with a warning "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 Suggested-by: Andy Lutomirski Cc: Lee Chun-Yi Cc: Borislav Petkov Cc: Tony Luck Cc: Will Deacon Cc: Dave Hansen Cc: Mark Rutland Cc: Bhupesh Sharma Cc: Naresh Bhat Cc: Ricardo Neri Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Matt Fleming Cc: Dan Williams Cc: Ard Biesheuvel Cc: Miguel Ojeda --- 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); } /* -- 2.7.4