Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1318
  • Last Modified:

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

Hello,

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?

Thanks
0
ashsysad
Asked:
ashsysad
2 Solutions
 
tampnicCommented:
the discussion here http://kerneltrap.org/node/6207 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."

Cheers,
  Chris
0
 
hossamshaabanCommented:
0
 
ashsysadAuthor Commented:
Thankyou so much. This is very useful for me.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now