From: Robert Hancock <hancockrwd@gmail.com>
To: George Kumar <grgkumar4@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Killing a kernel thread from user space ?
Date: Sun, 01 Feb 2009 14:37:03 -0600 [thread overview]
Message-ID: <498607EF.5070705@gmail.com> (raw)
In-Reply-To: <5f695cd0902011059g518cc6d4of00b8e1e00fe67c5@mail.gmail.com>
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.)
prev parent reply other threads:[~2009-02-01 20:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-01 18:59 Killing a kernel thread from user space ? George Kumar
2009-02-01 20:37 ` Robert Hancock [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=498607EF.5070705@gmail.com \
--to=hancockrwd@gmail.com \
--cc=grgkumar4@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox