2.2.14: hang when loading multiple modules

From: Paul Jakma (paulj@itg.ie)
Date: Fri Jun 16 2000 - 11:10:42 EST


I'm trying to remove CAP_SYS_MODULES from cap-bound. To this end i'm
writing an rc script to insert all the modules that the box needs.

my initial attempt at loading all the modules was:

for MODULE in \
        cpqarray \
        autofs fat msdos nfsd nfs \
        ip_masq_ftp ip_masq_portfw ipip rarp \
        sunrpc \
        eepro \
        ethertap bsd_comp dummy eql ppp_deflate slhc ppp \
        sg st sym53c8xx;

do
        modprobe $MODULE
done

Unfortunately this caused the machine to hang. It didn't respond to pings,
i could change between vt's, and i could type a login name - but the
password prompt wouldn't come up. From the logs the script had made it
at least as far as the IP tunnelling module.

i already knew that module loads are possibly racy, eg where one modprobe
is run while another is still working. however i didn't suspect that it
could happen during a sequential module load. (ie modprobe could not have
been called in parallel within the script).

lsmod just before the script would have looked something like:

Module Size Used by
ip_masq_ftp 4088 0 (unused)
ethertap 2388 1 (autoclean)
lockd 30344 1 (autoclean)
sunrpc 52132 1 (autoclean) [lockd]
ppp 19500 2 (autoclean)
slhc 4312 0 (autoclean) [ppp]
eepro100 15652 1 (autoclean)
cpqarray 15016 7
ncr53c8xx 51424 0 (unused)
bsd_comp .....

the only possible module that could have been unloaded race would have
been ppp and related modules. however, the ppp connection was up.. and
even if it had gone down, the module wouldn't have been unloaded for at
least a couple of minutes.

is this a known problem? and if so, how can i robustly load all the
modules in one go? do i have to check that the module isn't already
loaded? Do I have to add a sleep between each call to modprobe - and if
so, for how long to be safe?

kernel: RedHat 6.2 2.2.14-5.0. Running on a Compaq Proliant 3000 with
a SMART 2DH array card.

regards,

Paul Jakma
ITG CS sys admin.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:12 EST