How can insmod fail with kernel module is already loaded, even is lsmod does not contain that module?Are...

How long would it take for people to notice a mass disappearance?

Would glacier 'trees' be plausible?

If I set assumevalid=0 after syncing the blockchain will Bitcoin Core go back and validate historical blocks?

What does "Managed by Windows" do in the Power options for network connection?

Why aren't nationalizations in Russia described as socialist?

I'm in your subnets, golfing your code

Is there an official reason for not adding a post-credits scene?

Building a list of products from the elements in another list

Has a commercial or military jet bi-plane ever been manufactured?

A factorization game

Shutter speed -vs- effective image stabilisation

Copy previous line to current line from text file

Can a Tiefling have more than two horns?

3D Volume in TIKZ

Can my company stop me from working overtime?

How do inspiraling black holes get closer?

Point of the Dothraki's attack in GoT S8E3?

Where can I go to avoid planes overhead?

Can I use a fetch land to shuffle my deck while the opponent has Ashiok, Dream Render in play?

How do LIGO and VIRGO know that a gravitational wave has its origin in a neutron star or a black hole?

What was Bran's plan to kill the Night King?

Why do people keep telling me that I am a bad photographer?

How to increase the size of the cursor in Lubuntu 19.04?

Word meaning as function of the composition of its phonemes



How can insmod fail with kernel module is already loaded, even is lsmod does not contain that module?


Are Modules listed under /sys/module all the Loaded Modules?Binding lsmod module name with kernel configuration menu entryLinux cdc_acm device - unexpected characters sent to USB deviceWhy does modinfo say “could not find module”, yet lsmod claims the module is loaded?usb kernel module does not load on demand but works fine with insmod and modprobe from the shellHow to install kernel development headers to staging with Buildroot for kernel module development?How to load custom Linux kernel module that is not Linux kernel version dependant using RPMHow to to insmod a module build with linux-headers-generic?disable kernel module which is compiled in kernel (not loaded)How does Linux kernel dynamically use a module?Linux kernel module development buildroot






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







2















I'm making a minimal Linux distro with buildroot to learn kernel module development.



If I call a minimal module hello.ko (or almost any other name I've tried), everything works fine.



However, if I use the exact same code, but call the module workqueue.ko, insmod workqueue.ko fails, dmesg contains:



workqueue: module is already loaded


and insmod outputs to stderr:



insmod: can't insert 'workqueue.ko': invalid argument


Both lsmod and cat /proc/modules are empty.



This is the exact repo that produced the problem.



For reference the module code is:



#include <linux/module.h>
#include <linux/kernel.h>

MODULE_LICENSE("GPL");

int init_module(void)
{
printk(KERN_INFO "hello initn");
return 0;
}

void cleanup_module(void)
{
printk(KERN_INFO "hello cleanupn");
}


and the kernel version (default implied by buildroot) is 4.9.










share|improve this question































    2















    I'm making a minimal Linux distro with buildroot to learn kernel module development.



    If I call a minimal module hello.ko (or almost any other name I've tried), everything works fine.



    However, if I use the exact same code, but call the module workqueue.ko, insmod workqueue.ko fails, dmesg contains:



    workqueue: module is already loaded


    and insmod outputs to stderr:



    insmod: can't insert 'workqueue.ko': invalid argument


    Both lsmod and cat /proc/modules are empty.



    This is the exact repo that produced the problem.



    For reference the module code is:



    #include <linux/module.h>
    #include <linux/kernel.h>

    MODULE_LICENSE("GPL");

    int init_module(void)
    {
    printk(KERN_INFO "hello initn");
    return 0;
    }

    void cleanup_module(void)
    {
    printk(KERN_INFO "hello cleanupn");
    }


    and the kernel version (default implied by buildroot) is 4.9.










    share|improve this question



























      2












      2








      2








      I'm making a minimal Linux distro with buildroot to learn kernel module development.



      If I call a minimal module hello.ko (or almost any other name I've tried), everything works fine.



      However, if I use the exact same code, but call the module workqueue.ko, insmod workqueue.ko fails, dmesg contains:



      workqueue: module is already loaded


      and insmod outputs to stderr:



      insmod: can't insert 'workqueue.ko': invalid argument


      Both lsmod and cat /proc/modules are empty.



      This is the exact repo that produced the problem.



      For reference the module code is:



      #include <linux/module.h>
      #include <linux/kernel.h>

      MODULE_LICENSE("GPL");

      int init_module(void)
      {
      printk(KERN_INFO "hello initn");
      return 0;
      }

      void cleanup_module(void)
      {
      printk(KERN_INFO "hello cleanupn");
      }


      and the kernel version (default implied by buildroot) is 4.9.










      share|improve this question
















      I'm making a minimal Linux distro with buildroot to learn kernel module development.



      If I call a minimal module hello.ko (or almost any other name I've tried), everything works fine.



      However, if I use the exact same code, but call the module workqueue.ko, insmod workqueue.ko fails, dmesg contains:



      workqueue: module is already loaded


      and insmod outputs to stderr:



      insmod: can't insert 'workqueue.ko': invalid argument


      Both lsmod and cat /proc/modules are empty.



      This is the exact repo that produced the problem.



      For reference the module code is:



      #include <linux/module.h>
      #include <linux/kernel.h>

      MODULE_LICENSE("GPL");

      int init_module(void)
      {
      printk(KERN_INFO "hello initn");
      return 0;
      }

      void cleanup_module(void)
      {
      printk(KERN_INFO "hello cleanupn");
      }


      and the kernel version (default implied by buildroot) is 4.9.







      linux linux-kernel kernel-modules buildroot






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 14 '17 at 14:03









      GAD3R

      28.6k1959116




      28.6k1959116










      asked May 14 '17 at 10:35









      Ciro Santilli 新疆改造中心996ICU六四事件Ciro Santilli 新疆改造中心996ICU六四事件

      5,63024847




      5,63024847






















          2 Answers
          2






          active

          oldest

          votes


















          2














          $ uname -a
          Linux alan-laptop 4.10.14-200.fc25.x86_64 #1 SMP Wed May 3 22:52:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
          $ ls /sys/module/workqueue/
          parameters uevent
          $ ls /sys/module/workqueue/parameters/
          debug_force_rr_cpu disable_numa power_efficient


          It's a builtin already. Maybe to provide a namespace for the parameters that effect kernel workqueue behaviour.






          share|improve this answer
























          • Hmmm, can you find where in the source that gets created? I could not find any settings in .config. Why not just use other /sys files that don't conflict with module names?

            – Ciro Santilli 新疆改造中心996ICU六四事件
            May 14 '17 at 11:45






          • 1





            @CiroSantilli709大抓捕六四事件法轮功 You know how to define a module, you can just use git grep to search for a definition of the module workqueue.

            – sourcejedi
            May 14 '17 at 12:10













          • @CiroSantilli包子露宪六四事件法轮功 that's not what the link says. It is /sys/module/ that shows builtins like this "workqueue". They don't show up in /proc/modules.

            – sourcejedi
            May 15 '18 at 17:46











          • Yes, you are right, I copied wrong.

            – Ciro Santilli 新疆改造中心996ICU六四事件
            May 15 '18 at 19:21











          • fun fact: some things under /sys/module are not necessarily moduels it seems unix.stackexchange.com/questions/225706/…

            – Ciro Santilli 新疆改造中心996ICU六四事件
            May 15 '18 at 19:22



















          0














          Do not use workqueue as kernel module's name.
          In this case, some conflicts could happen.






          share|improve this answer








          New contributor




          劉宥辰 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.





















            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',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            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%2f364956%2fhow-can-insmod-fail-with-kernel-module-is-already-loaded-even-is-lsmod-does-not%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            $ uname -a
            Linux alan-laptop 4.10.14-200.fc25.x86_64 #1 SMP Wed May 3 22:52:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
            $ ls /sys/module/workqueue/
            parameters uevent
            $ ls /sys/module/workqueue/parameters/
            debug_force_rr_cpu disable_numa power_efficient


            It's a builtin already. Maybe to provide a namespace for the parameters that effect kernel workqueue behaviour.






            share|improve this answer
























            • Hmmm, can you find where in the source that gets created? I could not find any settings in .config. Why not just use other /sys files that don't conflict with module names?

              – Ciro Santilli 新疆改造中心996ICU六四事件
              May 14 '17 at 11:45






            • 1





              @CiroSantilli709大抓捕六四事件法轮功 You know how to define a module, you can just use git grep to search for a definition of the module workqueue.

              – sourcejedi
              May 14 '17 at 12:10













            • @CiroSantilli包子露宪六四事件法轮功 that's not what the link says. It is /sys/module/ that shows builtins like this "workqueue". They don't show up in /proc/modules.

              – sourcejedi
              May 15 '18 at 17:46











            • Yes, you are right, I copied wrong.

              – Ciro Santilli 新疆改造中心996ICU六四事件
              May 15 '18 at 19:21











            • fun fact: some things under /sys/module are not necessarily moduels it seems unix.stackexchange.com/questions/225706/…

              – Ciro Santilli 新疆改造中心996ICU六四事件
              May 15 '18 at 19:22
















            2














            $ uname -a
            Linux alan-laptop 4.10.14-200.fc25.x86_64 #1 SMP Wed May 3 22:52:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
            $ ls /sys/module/workqueue/
            parameters uevent
            $ ls /sys/module/workqueue/parameters/
            debug_force_rr_cpu disable_numa power_efficient


            It's a builtin already. Maybe to provide a namespace for the parameters that effect kernel workqueue behaviour.






            share|improve this answer
























            • Hmmm, can you find where in the source that gets created? I could not find any settings in .config. Why not just use other /sys files that don't conflict with module names?

              – Ciro Santilli 新疆改造中心996ICU六四事件
              May 14 '17 at 11:45






            • 1





              @CiroSantilli709大抓捕六四事件法轮功 You know how to define a module, you can just use git grep to search for a definition of the module workqueue.

              – sourcejedi
              May 14 '17 at 12:10













            • @CiroSantilli包子露宪六四事件法轮功 that's not what the link says. It is /sys/module/ that shows builtins like this "workqueue". They don't show up in /proc/modules.

              – sourcejedi
              May 15 '18 at 17:46











            • Yes, you are right, I copied wrong.

              – Ciro Santilli 新疆改造中心996ICU六四事件
              May 15 '18 at 19:21











            • fun fact: some things under /sys/module are not necessarily moduels it seems unix.stackexchange.com/questions/225706/…

              – Ciro Santilli 新疆改造中心996ICU六四事件
              May 15 '18 at 19:22














            2












            2








            2







            $ uname -a
            Linux alan-laptop 4.10.14-200.fc25.x86_64 #1 SMP Wed May 3 22:52:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
            $ ls /sys/module/workqueue/
            parameters uevent
            $ ls /sys/module/workqueue/parameters/
            debug_force_rr_cpu disable_numa power_efficient


            It's a builtin already. Maybe to provide a namespace for the parameters that effect kernel workqueue behaviour.






            share|improve this answer













            $ uname -a
            Linux alan-laptop 4.10.14-200.fc25.x86_64 #1 SMP Wed May 3 22:52:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
            $ ls /sys/module/workqueue/
            parameters uevent
            $ ls /sys/module/workqueue/parameters/
            debug_force_rr_cpu disable_numa power_efficient


            It's a builtin already. Maybe to provide a namespace for the parameters that effect kernel workqueue behaviour.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered May 14 '17 at 11:40









            sourcejedisourcejedi

            26.7k445119




            26.7k445119













            • Hmmm, can you find where in the source that gets created? I could not find any settings in .config. Why not just use other /sys files that don't conflict with module names?

              – Ciro Santilli 新疆改造中心996ICU六四事件
              May 14 '17 at 11:45






            • 1





              @CiroSantilli709大抓捕六四事件法轮功 You know how to define a module, you can just use git grep to search for a definition of the module workqueue.

              – sourcejedi
              May 14 '17 at 12:10













            • @CiroSantilli包子露宪六四事件法轮功 that's not what the link says. It is /sys/module/ that shows builtins like this "workqueue". They don't show up in /proc/modules.

              – sourcejedi
              May 15 '18 at 17:46











            • Yes, you are right, I copied wrong.

              – Ciro Santilli 新疆改造中心996ICU六四事件
              May 15 '18 at 19:21











            • fun fact: some things under /sys/module are not necessarily moduels it seems unix.stackexchange.com/questions/225706/…

              – Ciro Santilli 新疆改造中心996ICU六四事件
              May 15 '18 at 19:22



















            • Hmmm, can you find where in the source that gets created? I could not find any settings in .config. Why not just use other /sys files that don't conflict with module names?

              – Ciro Santilli 新疆改造中心996ICU六四事件
              May 14 '17 at 11:45






            • 1





              @CiroSantilli709大抓捕六四事件法轮功 You know how to define a module, you can just use git grep to search for a definition of the module workqueue.

              – sourcejedi
              May 14 '17 at 12:10













            • @CiroSantilli包子露宪六四事件法轮功 that's not what the link says. It is /sys/module/ that shows builtins like this "workqueue". They don't show up in /proc/modules.

              – sourcejedi
              May 15 '18 at 17:46











            • Yes, you are right, I copied wrong.

              – Ciro Santilli 新疆改造中心996ICU六四事件
              May 15 '18 at 19:21











            • fun fact: some things under /sys/module are not necessarily moduels it seems unix.stackexchange.com/questions/225706/…

              – Ciro Santilli 新疆改造中心996ICU六四事件
              May 15 '18 at 19:22

















            Hmmm, can you find where in the source that gets created? I could not find any settings in .config. Why not just use other /sys files that don't conflict with module names?

            – Ciro Santilli 新疆改造中心996ICU六四事件
            May 14 '17 at 11:45





            Hmmm, can you find where in the source that gets created? I could not find any settings in .config. Why not just use other /sys files that don't conflict with module names?

            – Ciro Santilli 新疆改造中心996ICU六四事件
            May 14 '17 at 11:45




            1




            1





            @CiroSantilli709大抓捕六四事件法轮功 You know how to define a module, you can just use git grep to search for a definition of the module workqueue.

            – sourcejedi
            May 14 '17 at 12:10







            @CiroSantilli709大抓捕六四事件法轮功 You know how to define a module, you can just use git grep to search for a definition of the module workqueue.

            – sourcejedi
            May 14 '17 at 12:10















            @CiroSantilli包子露宪六四事件法轮功 that's not what the link says. It is /sys/module/ that shows builtins like this "workqueue". They don't show up in /proc/modules.

            – sourcejedi
            May 15 '18 at 17:46





            @CiroSantilli包子露宪六四事件法轮功 that's not what the link says. It is /sys/module/ that shows builtins like this "workqueue". They don't show up in /proc/modules.

            – sourcejedi
            May 15 '18 at 17:46













            Yes, you are right, I copied wrong.

            – Ciro Santilli 新疆改造中心996ICU六四事件
            May 15 '18 at 19:21





            Yes, you are right, I copied wrong.

            – Ciro Santilli 新疆改造中心996ICU六四事件
            May 15 '18 at 19:21













            fun fact: some things under /sys/module are not necessarily moduels it seems unix.stackexchange.com/questions/225706/…

            – Ciro Santilli 新疆改造中心996ICU六四事件
            May 15 '18 at 19:22





            fun fact: some things under /sys/module are not necessarily moduels it seems unix.stackexchange.com/questions/225706/…

            – Ciro Santilli 新疆改造中心996ICU六四事件
            May 15 '18 at 19:22













            0














            Do not use workqueue as kernel module's name.
            In this case, some conflicts could happen.






            share|improve this answer








            New contributor




            劉宥辰 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.

























              0














              Do not use workqueue as kernel module's name.
              In this case, some conflicts could happen.






              share|improve this answer








              New contributor




              劉宥辰 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.























                0












                0








                0







                Do not use workqueue as kernel module's name.
                In this case, some conflicts could happen.






                share|improve this answer








                New contributor




                劉宥辰 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.










                Do not use workqueue as kernel module's name.
                In this case, some conflicts could happen.







                share|improve this answer








                New contributor




                劉宥辰 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                劉宥辰 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered 20 mins ago









                劉宥辰劉宥辰

                1




                1




                New contributor




                劉宥辰 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                劉宥辰 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                劉宥辰 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f364956%2fhow-can-insmod-fail-with-kernel-module-is-already-loaded-even-is-lsmod-does-not%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                    Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                    Ciclooctatetraenă Vezi și | Bibliografie | Meniu de navigare637866text4148569-500570979m