From: Andi Kleen <ak@muc.de>
To: Mikael Pettersson <mikpe@csd.uu.se>
Cc: linux-kernel@vger.kernel.org
Subject: Re: send_sig_info() in __switch_to() Ok or not?
Date: Sun, 24 Aug 2003 23:57:05 +0200 [thread overview]
Message-ID: <m3d6euk9ce.fsf@averell.firstfloor.org> (raw)
In-Reply-To: <o9Yo.6Zf.7@gated-at.bofh.it> (Mikael Pettersson's message of "Sun, 24 Aug 2003 22:50:12 +0200")
Mikael Pettersson <mikpe@csd.uu.se> writes:
> I have a kernel extension (the x86 perfctr driver) that needs,
> in a specific but unlikely case(*), to send a SIGILL to current
> (next) in __switch_to(). Is this permitted or not?
>
> I suspect it might not be because send_sig_info() eventually does
> wake_up_process_kick(), and there's this warning in __switch_to()
> not to call printk() since it calls wake_up()...
> If I can't call send_sig_info() in __switch_to(), is there
> another way to post a SIGILL to current from __switch_to()?
You can just do it manually. Fill in the signal in the signal
mask of the process. The next time the process checks for signals it will
kill itself. As it is already running or going to run it doesn't need
a wake up.
You could also forcibly call do_exit with the right signal, but
that cannot be blocked.
-Andi
next parent reply other threads:[~2003-08-24 21:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <o9Yo.6Zf.7@gated-at.bofh.it>
2003-08-24 21:57 ` Andi Kleen [this message]
2003-09-08 19:40 ` send_sig_info() in __switch_to() Ok or not? Mikael Pettersson
2003-08-24 20:40 Mikael Pettersson
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=m3d6euk9ce.fsf@averell.firstfloor.org \
--to=ak@muc.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@csd.uu.se \
/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