public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Huang <mlhuang@CS.Princeton.EDU>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] module_subsys: initialize earlier
Date: Wed, 26 Jul 2006 18:40:25 -0400	[thread overview]
Message-ID: <44C7EF59.80200@cs.princeton.edu> (raw)

Initialize module_subsys earlier (or at least earlier than devices) since it 
could be used very early in the boot process if kmod loads a module before the 
device initcalls. Otherwise, kmod will crash in 
kernel/module.c:mod_sysfs_setup() since the kset in module_subsys is not 
initialized yet.

I only noticed this problem because occasionally, kmod loads the modules for my 
SCSI and Ethernet adapters very early, during the boot process itself. I don't 
quite understand why it loads them sometimes and doesn't load them other times. 
Or who is telling kmod to do so. Can someone explain?

Please Cc: me on responses, thanks.

Signed-off-by: Mark Huang <mlhuang@cs.princeton.edu>

--- linux-2.6.18-rc2/kernel/params.c    2006-07-25 16:46:56.000000000 -0400
+++ linux-2.6.18-rc2.sysfs/kernel/params.c      2006-07-26 17:53:51.000000000 -0
400
@@ -690,7 +690,7 @@ static int __init param_sysfs_init(void)

         return 0;
  }
-__initcall(param_sysfs_init);
+subsys_initcall(param_sysfs_init);

  EXPORT_SYMBOL(param_set_byte);
  EXPORT_SYMBOL(param_get_byte);


                 reply	other threads:[~2006-07-26 22:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=44C7EF59.80200@cs.princeton.edu \
    --to=mlhuang@cs.princeton.edu \
    --cc=linux-kernel@vger.kernel.org \
    /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