mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Matt Domsch <Matt_Domsch@dell.com>
Cc: gallir@atlas-iap.es, matthew.e.tolentino@intel.com,
	linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH](2) efivars: check enabled {2.6.6 doesn't boot with 4k stacks}
Date: Tue, 11 May 2004 08:28:48 -0700	[thread overview]
Message-ID: <20040511082848.0b1d3bbd.rddunlap@osdl.org> (raw)
In-Reply-To: <20040511143833.GA14555@lists.us.dell.com>

On Tue, 11 May 2004 09:38:33 -0500 Matt Domsch wrote:

| On Mon, May 10, 2004 at 09:02:43PM -0700, Randy.Dunlap wrote:
| > // linux-266
| > // efivars_init and efivars_exit need to check efi_enabled
| > // instead of assuming that the system is using EFI;
| 
| Good catch.  I missed the creation of that in the x86 EFI merge.
| 
| > +++ ./drivers/firmware/efivars.c	2004-05-10 20:45:55.000000000 -0700
| > @@ -664,6 +664,9 @@ efivars_init(void)
| >  	unsigned long variable_name_size = 1024;
| >  	int i, rc = 0, error = 0;
| >  
| > +	if (!efi_enabled)
| > +		return 0;
| 
| I would think this would be return -ENODEV; instead, yes?

um, OK.  I suppose that is a good idea... to prevent the module
from remaining loaded.

Here's an updated diff.

--
~Randy



// linux-266
// efivars_init and _exit need to check for efi_enabled (or else crash);

diffstat:=
 drivers/firmware/efivars.c |    6 ++++++
 1 files changed, 6 insertions(+)


diff -Naurp ./drivers/firmware/efivars.c~efivars_check_enabled ./drivers/firmware/efivars.c
--- ./drivers/firmware/efivars.c~efivars_check_enabled	2004-05-09 19:33:13.000000000 -0700
+++ ./drivers/firmware/efivars.c	2004-05-11 08:43:07.000000000 -0700
@@ -664,6 +664,9 @@ efivars_init(void)
 	unsigned long variable_name_size = 1024;
 	int i, rc = 0, error = 0;
 
+	if (!efi_enabled)
+		return -ENODEV;
+
 	printk(KERN_INFO "EFI Variables Facility v%s\n", EFIVARS_VERSION);
 
 	/*
@@ -733,6 +736,9 @@ efivars_exit(void)
 {
 	struct list_head *pos, *n;
 
+	if (!efi_enabled)
+		return;
+
 	list_for_each_safe(pos, n, &efivar_list)
 		efivar_unregister(get_efivar_entry(pos));
 

      reply	other threads:[~2004-05-11 15:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040510172404.11a90ce9.rddunlap@osdl.org>
2004-05-11  4:02 ` [PATCH] " Randy.Dunlap
2004-05-11 14:38   ` Matt Domsch
2004-05-11 15:28     ` Randy.Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040511082848.0b1d3bbd.rddunlap@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=Matt_Domsch@dell.com \
    --cc=akpm@osdl.org \
    --cc=gallir@atlas-iap.es \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.e.tolentino@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®