public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Cedric Le Goater <clg@fr.ibm.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Paul Mackerras <paulus@samba.org>
Subject: Re: [RFC][PATCH -mm] replace cad_pid by a struct pid
Date: Wed, 20 Sep 2006 14:30:28 -0700	[thread overview]
Message-ID: <20060920143028.fd446145.akpm@osdl.org> (raw)
In-Reply-To: <45110C1B.7020304@fr.ibm.com>

On Wed, 20 Sep 2006 11:38:35 +0200
Cedric Le Goater <clg@fr.ibm.com> wrote:

> There are a few places in the kernel where the init task is
> signaled. The ctrl+alt+del sequence is one them. It kills a task,
> usually init, using a cached pid (cad_pid).
> 
> This patch replaces the pid_t by a struct pid to avoid pid wrap around
> problem. The struct pid is initialized at boot time in init() and can
> be modified through systctl with
> 
> 	/proc/sys/kernel/cad_pid

hm.  Is there any sane scenario in which C-A-D would be directed to any
other process?

What happens if/when the process which is identifier by
/proc/sys/kernel/cad_pid exits?  User error, I guess...

> +extern struct pid* cad_pid;

Whitespace violation detected!

> -	if (shuting_down || kill_proc(1, SIGINT, 1)) {
> +	if (shuting_down || kill_cad_pid(SIGINT, 1)) {

So your patch actually makes functional changes: lots of random
init-signallers gain extra functionality: the process which they signal can
now be configured via /proc/sys/kernel/cad_pid.  But by default, things
remain unchanged.  Fair enough.


> --- 2.6.18-rc7-mm1.orig/drivers/char/nwbutton.c
> +++ 2.6.18-rc7-mm1/drivers/char/nwbutton.c

This driver can be compiled as a module.  I shall add the missing export...

(And I'll fix the parisc build too)

  reply	other threads:[~2006-09-20 21:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-20  9:38 [RFC][PATCH -mm] replace cad_pid by a struct pid Cedric Le Goater
2006-09-20 21:30 ` Andrew Morton [this message]
2006-09-21 13:21   ` Cedric Le Goater
2006-09-21 17:39     ` Andrew Morton

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=20060920143028.fd446145.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=clg@fr.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=schwidefsky@de.ibm.com \
    /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