* Killing a kernel thread from user space ?
@ 2009-02-01 18:59 George Kumar
2009-02-01 20:37 ` Robert Hancock
0 siblings, 1 reply; 2+ messages in thread
From: George Kumar @ 2009-02-01 18:59 UTC (permalink / raw)
To: linux-kernel
Hi,
Is it possible to kill a kernel thread from user space. Don't ask me
why do I need to do this. This is purely an experimental exercise, I
am not doing it because I am working on a practical problem. Thing is
that I wrote a kernel module and now it is hung in a kernel thread
somewhere doing udelay(), fortunately since I am on preemptible kernel
my machine is not frozen,
but still I saw that doing a kill -9 on this process has no effect.
How about if I insert another kernel module and kill this busywait
thread from inside the kernel space. In effect how do you execute
"kill -9" from one kernel thread to misbehaving kernel thread.
thanks.
george
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Killing a kernel thread from user space ?
2009-02-01 18:59 Killing a kernel thread from user space ? George Kumar
@ 2009-02-01 20:37 ` Robert Hancock
0 siblings, 0 replies; 2+ messages in thread
From: Robert Hancock @ 2009-02-01 20:37 UTC (permalink / raw)
To: George Kumar; +Cc: linux-kernel
George Kumar wrote:
> Hi,
>
> Is it possible to kill a kernel thread from user space. Don't ask me
> why do I need to do this. This is purely an experimental exercise, I
> am not doing it because I am working on a practical problem. Thing is
> that I wrote a kernel module and now it is hung in a kernel thread
> somewhere doing udelay(), fortunately since I am on preemptible kernel
> my machine is not frozen,
> but still I saw that doing a kill -9 on this process has no effect.
> How about if I insert another kernel module and kill this busywait
> thread from inside the kernel space. In effect how do you execute
> "kill -9" from one kernel thread to misbehaving kernel thread.
You can't, really. Kernel threads (or any kernel code) can't be
interrupted by signals, except where they are explicitly coded so that
they can be (breaking out of a loop due to signal_pending(), etc.)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-01 20:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-01 18:59 Killing a kernel thread from user space ? George Kumar
2009-02-01 20:37 ` Robert Hancock
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox