archive mirror
 help / color / mirror / Atom feed
From: Andrey Borzenkov <>
Cc: "Chmouel Boudjnah" <>,, Rusty Russell <>
Subject: 2.6: races between modprobe and depmod in rc.sysinit
Date: Thu, 31 Jul 2003 21:45:01 +0400	[thread overview]
Message-ID: <> (raw)

This started when I noticed that coldplugging of my USB flash did not work. I 
added call to /etc/hotplug/usb.rc in rc.sysinit but it still did not work 
because scsi.agent was not ready for 2.6. I fixed scsi.agent to work for 2.6 
- and it still did not work with nice message "sd_mod not found". I added 
strace to scsi.agent - and wow! it opens /lib/modules/`uname -r`/modules.dep 
and reads 0 bytes ... it adds /lib/modules/`uname -r`/modules.alias -and read 
0 bytes ...

the only reason I can imagine is that it hits depmod -A that runs in 
rc.sysinit and does

truncate /lib/modules/`uname -r`/modules.*
scan modules
write files

So, quesitons

- would anybody (Rusty?) object if I change depmod to do 
  build temp name
  move temp name into original

to avoid such races?

- Chmouel, Fred - is depmod on every boot really neccessary? When people 
install modules they are expected to run it actually ...


             reply	other threads:[~2003-07-31 17:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-31 17:45 Andrey Borzenkov [this message]
2003-08-01  6:34 ` 2.6: races between modprobe and depmod in rc.sysinit Rusty Russell
2003-08-01 21:22   ` [PATCH] " Andrey Borzenkov
2003-08-02  0:29     ` Rusty Russell
2003-08-08 21:19       ` Andrey Borzenkov

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:

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

  git send-email \ \ \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).