mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] Kernel thread signal handling.
Date: Mon, 13 Oct 2003 04:02:19 -0700	[thread overview]
Message-ID: <20031013040219.6ad71a57.akpm@osdl.org> (raw)
In-Reply-To: <1066041096.24015.431.camel@hades.cambridge.redhat.com>

David Woodhouse <dwmw2@infradead.org> wrote:
>
>  1. We need disallow_signal() to complement allow_signal().
> 
>  2. We need a function which does dequeue_signal() _with_ locking.
> 
>  3. We might need a better name for #2. Change if you care.
> 
>  4. We need allow_signal() to actually allow signals other than
>     SIGKILL. Currently they get either converted to SIGKILL or
>     silently dropped, according to whether your kernel thread
>     happens to have sa_handler set for the signal in question.
> 
>     It would be nicer to fix this in the signal delivery code
>     itself if (!tsk->mm) rather than by faking a handler in
>     allow_signal(). I'm not touching the signal delivery code
>     with a bargepole though. Hopefully the proposed change to
>     allow_signal() will provoke someone else into doing so.

Sigh.  Using signals to communicate with kernel threads is evil.  It keeps
on breaking and each site does it differently and we've had plenty of bugs
due to this practice.

Signals are for userspace and the signal developers shouldn't have to worry
about weird in-kernel abuse and we have other simpler, more reliable
mechanisms available in-kernel and even more such ranting you get the
point.

Is there no way in which jffs2 can be weaned off this obnoxious habit?



  reply	other threads:[~2003-10-13 10:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-13 10:31 David Woodhouse
2003-10-13 11:02 ` Andrew Morton [this message]
2003-10-13 11:08   ` Russell King
2003-10-13 11:29     ` David Woodhouse
2003-10-13 11:21   ` David Woodhouse
2003-10-13 11:40     ` Andrew Morton
2003-10-13 11:55       ` David Woodhouse
2003-10-13 12:11         ` Andrew Morton
2003-10-13 12:30           ` David Woodhouse
2003-10-13 16:36   ` Linus Torvalds

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=20031013040219.6ad71a57.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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

all inboxes | Powered by JetHome®