lsmod 'used by' shows -1 while CONFIG_MODULE_UNLOAD=y

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
4
down vote

favorite












In this post there is some explanation about why does lsmod show -2 in 'used by' column. The idea is that the kernel config option CONFIG_MODULE_UNLOAD was not set.



But what if lsmod shows -1 only for one specific module while CONFIG_MODULE_UNLOAD is set in my current kernel? How to debug this muddle?










share|improve this question





















  • Does /sys/module/<module>/refcnt exist for that specific module? If so, what does it contain?
    – Stephen Kitt
    2 hours ago










  • @StephenKitt It contains -1 too.
    – z0lupka
    1 hour ago














up vote
4
down vote

favorite












In this post there is some explanation about why does lsmod show -2 in 'used by' column. The idea is that the kernel config option CONFIG_MODULE_UNLOAD was not set.



But what if lsmod shows -1 only for one specific module while CONFIG_MODULE_UNLOAD is set in my current kernel? How to debug this muddle?










share|improve this question





















  • Does /sys/module/<module>/refcnt exist for that specific module? If so, what does it contain?
    – Stephen Kitt
    2 hours ago










  • @StephenKitt It contains -1 too.
    – z0lupka
    1 hour ago












up vote
4
down vote

favorite









up vote
4
down vote

favorite











In this post there is some explanation about why does lsmod show -2 in 'used by' column. The idea is that the kernel config option CONFIG_MODULE_UNLOAD was not set.



But what if lsmod shows -1 only for one specific module while CONFIG_MODULE_UNLOAD is set in my current kernel? How to debug this muddle?










share|improve this question













In this post there is some explanation about why does lsmod show -2 in 'used by' column. The idea is that the kernel config option CONFIG_MODULE_UNLOAD was not set.



But what if lsmod shows -1 only for one specific module while CONFIG_MODULE_UNLOAD is set in my current kernel? How to debug this muddle?







linux linux-kernel kernel-modules kernel-parameters






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 hours ago









z0lupka

504




504











  • Does /sys/module/<module>/refcnt exist for that specific module? If so, what does it contain?
    – Stephen Kitt
    2 hours ago










  • @StephenKitt It contains -1 too.
    – z0lupka
    1 hour ago
















  • Does /sys/module/<module>/refcnt exist for that specific module? If so, what does it contain?
    – Stephen Kitt
    2 hours ago










  • @StephenKitt It contains -1 too.
    – z0lupka
    1 hour ago















Does /sys/module/<module>/refcnt exist for that specific module? If so, what does it contain?
– Stephen Kitt
2 hours ago




Does /sys/module/<module>/refcnt exist for that specific module? If so, what does it contain?
– Stephen Kitt
2 hours ago












@StephenKitt It contains -1 too.
– z0lupka
1 hour ago




@StephenKitt It contains -1 too.
– z0lupka
1 hour ago










1 Answer
1






active

oldest

votes

















up vote
4
down vote



accepted










A module reference count of -1, visible both in /sys/module/<module>/refcnt and in lsmod’s output, means that the module is currently unloading.



If a module’s reference count stays at -1, that indicates a problem — dmesg should tell you more.






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474450%2flsmod-used-by-shows-1-while-config-module-unload-y%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    4
    down vote



    accepted










    A module reference count of -1, visible both in /sys/module/<module>/refcnt and in lsmod’s output, means that the module is currently unloading.



    If a module’s reference count stays at -1, that indicates a problem — dmesg should tell you more.






    share|improve this answer
























      up vote
      4
      down vote



      accepted










      A module reference count of -1, visible both in /sys/module/<module>/refcnt and in lsmod’s output, means that the module is currently unloading.



      If a module’s reference count stays at -1, that indicates a problem — dmesg should tell you more.






      share|improve this answer






















        up vote
        4
        down vote



        accepted







        up vote
        4
        down vote



        accepted






        A module reference count of -1, visible both in /sys/module/<module>/refcnt and in lsmod’s output, means that the module is currently unloading.



        If a module’s reference count stays at -1, that indicates a problem — dmesg should tell you more.






        share|improve this answer












        A module reference count of -1, visible both in /sys/module/<module>/refcnt and in lsmod’s output, means that the module is currently unloading.



        If a module’s reference count stays at -1, that indicates a problem — dmesg should tell you more.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 1 hour ago









        Stephen Kitt

        150k23332399




        150k23332399



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474450%2flsmod-used-by-shows-1-while-config-module-unload-y%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What does second last employer means? [closed]

            List of Gilmore Girls characters

            Confectionery