How to stop Linux kernel threads on rmmod?

后端 未结 3 865
礼貌的吻别
礼貌的吻别 2021-01-30 18:25

I wrote the following code to create a kernel thread:

#include
#include
#include
#include

        
3条回答
  •  面向向阳花
    2021-01-30 18:39

    in the code u need not use kthread_create api as kthread_run does it internally.. Use either

    task = kthread_create(&thread_function,(void *)data,"pradeep");
    OR
    task = kthread_run(&thread_function,(void *)data,"pradeep");

    Also your module is not under GPL license. That could be one cause of your issues.

提交回复
热议问题