[lkml]   [2002]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectPossible Bug in "sys_init_module"?

    Please cc me since I'm not on the mailing list.

    While debugging several proprietary modules at work with a dual SMP x86
    box running a 2.4.18 kernel, I noticed that when attempting to
    concurrently execute two scripts that loaded and unloaded a stack of
    modules, the box kept on crashing. In my search for the problem I noticed
    that the function "sys_init_module" in kernel/module.c may have a
    possible bug.

    Assume that one script invokes modprobe which calls "sys_init_module"
    first. The big kernel lock is taken and then plenty of sanity checks
    done. After dependencies are checked and updated, the "init_module"
    function of the module is invoked. Now if this function happens to block,
    the kernel lock is dropped. A call to "sys_init_module" by modprobe in
    the other script to initialise a second module dependent on the first
    could then take the big kernel lock, check the dependencies and find them
    okay, and then have its "init_module" function invoked. And if this
    second module relies on the first module being properly initialised
    before it is loaded, this can break.

    Is this an issue that requires attention? Or am I overlooking something
    in the code?


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:27    [W:0.020 / U:5.932 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site