[lkml]   [2009]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Tips for module_init() dependencies
    Daniel Walker wrote:
    > On Thu, 2009-10-15 at 09:01 -0400, Gregory Haskins wrote:
    >> may break, because the kernel seems to have no concept of
    >> interdependency between foo_init() and bar_init(), and therefore
    >> bar_init() may call foo() before foo_init() has executed.
    >> There are various ways to solve this problem, such as deferring calling
    >> foo() with a workqueue or something, but I was wondering if there was a
    >> better/standard way to do this that I am missing?
    >> The problem I am having specifically is that I am trying to call
    >> configfs_register_subsystem() in a module_init(), but this breaks when
    >> built into the kernel based on sheer bad luck that configfs gets
    >> initialized after me. To date I have worked around this by forcing my
    >> code to only support built-in, and using late_initcall() instead or
    >> module_init. This works, but it only means I am putting the problem off
    >> (code that depends on *me* has to use similar tricks, etc.
    > You can't modify the build order so your module get "builtin" after
    > configfs?

    Hi Daniel,


    A) Any suggestions on how? Can I express this in Kconfig or something
    (i.e. "depends on FOO"). I currently have "select FOO" in the BAR
    object, but this doesn't seem to be sufficient to describe the relationship.

    B) Do I have to make the entire chain follow suit? (I have C deps on B,
    B deps on A kind of scenarios)

    Kind Regards,

    [unhandled content-type:application/pgp-signature]
     \ /
      Last update: 2009-10-15 18:11    [W:0.021 / U:5.284 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site