public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: kernel-janitors@lists.osdl.org, linux-kernel@vger.kernel.org,
	torvalds@osdl.org, akpm@osdl.org, marcel@holtman.org,
	fpavlic@de.ibm.com, paulus@au.ibm.com, bcollins@debian.org,
	tony.luck@intel.com
Subject: Re: [KJ] (re) audit return code handling for kernel_thread [3/3]
Date: Sat, 29 Jul 2006 16:20:24 -0400	[thread overview]
Message-ID: <20060729202024.GD8574@localhost.localdomain> (raw)
In-Reply-To: <20060729201139.GA8574@localhost.localdomain>

Patch to audit return codes for kernel_thread.  This patch corrects callers who
have differing assumptions about the meaning of a zero return code.  I've
normalized all the callers to consider a zero return code a successful return.

Thanks & Regards
Neil

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>


 arch/ia64/sn/kernel/xpc_main.c |    2 +-
 init/do_mounts_initrd.c        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


--- a/arch/ia64/sn/kernel/xpc_main.c
+++ b/arch/ia64/sn/kernel/xpc_main.c
@@ -583,7 +583,7 @@ xpc_activate_partition(struct xpc_partit
 
 	pid = kernel_thread(xpc_activating, (void *) ((u64) partid), 0);
 
-	if (unlikely(pid <= 0)) {
+	if (unlikely(pid < 0)) {
 		spin_lock_irqsave(&part->act_lock, irq_flags);
 		part->act_state = XPC_P_INACTIVE;
 		XPC_SET_REASON(part, xpcCloneKThreadFailed, __LINE__);
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -57,7 +57,7 @@ static void __init handle_initrd(void)
 
 	current->flags |= PF_NOFREEZE;
 	pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
-	if (pid > 0) {
+	if (pid >= 0) {
 		while (pid != sys_wait4(-1, NULL, 0, NULL))
 			yield();
 	}

      parent reply	other threads:[~2006-07-29 20:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-29 20:11 [KJ] (re) audit return code handling for kernel_thread [0/3] Neil Horman
2006-07-29 20:15 ` [KJ] (re) audit return code handling for kernel_thread [1/3] Neil Horman
2006-07-30  0:03   ` Andrew Morton
2006-07-30  0:48     ` Neil Horman
2006-07-30 21:39       ` Heiko Carstens
2006-07-31  9:17         ` Heiko Carstens
2006-07-29 20:18 ` [KJ] (re) audit return code handling for kernel_thread [2/3] Neil Horman
2006-07-29 20:20 ` Neil Horman [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=20060729202024.GD8574@localhost.localdomain \
    --to=nhorman@tuxdriver.com \
    --cc=akpm@osdl.org \
    --cc=bcollins@debian.org \
    --cc=fpavlic@de.ibm.com \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtman.org \
    --cc=paulus@au.ibm.com \
    --cc=tony.luck@intel.com \
    --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