How to kill a kernel thread that was created by kernel_thread()

Posted on 2011-10-31
Last Modified: 2012-05-12

I have a kernel module that at init it will create a thread by kernel_thread() function.
At exit I supposed to clean it up.  

The kernel_thread returns a pid,  so I was thinking to use kill_proc_info() to kill it but then insmod complains this kill_proc_info() symbol not found. So I guess it was not exported.

What should be  the right api to use to kill a kernel thread given a pid?

Question by:ashsysad
    LVL 7

    Accepted Solution

    the discussion here may be applciable to your case. Specifically from the link

    "you can use kill_proc(thread_id, signal_name) to send a signal to kernel thread, note that all signals are blocked by default, you have to allow_signal(what_signal_you_want) at the beginning of the kernel thread."

    LVL 5

    Assisted Solution


    Author Closing Comment

    Thankyou so much. This is very useful for me.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    This tutorial is posted by Aaron Wojnowski, administrator at  To view more iPhone tutorials, visit This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
    Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode ( They will have you believe that Unicode requires you to use…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now