From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH] Fix rtasd zombie on PowerMac G5
Date: Tue, 17 Feb 2004 10:56:31 +1100 [thread overview]
Message-ID: <1076975790.3648.108.camel@gaston> (raw)
Hi !
The rtasd kernel thread would exit before daemoniz'ing itself if
RTAS wasn't present (or if allocation of the buffer failed), thus
leaving a zombie. This patch fixes it (and remove #if 0'ed code)
Please apply,
Ben.
===== arch/ppc64/kernel/rtasd.c 1.15 vs edited =====
--- 1.15/arch/ppc64/kernel/rtasd.c Mon Jan 19 17:28:25 2004
+++ edited/arch/ppc64/kernel/rtasd.c Tue Feb 17 10:54:22 2004
@@ -347,6 +347,8 @@
int event_scan = rtas_token("event-scan");
int rc;
+ daemonize("rtasd");
+
if (event_scan == RTAS_UNKNOWN_SERVICE || get_eventscan_parms() == -1)
goto error;
@@ -359,15 +361,9 @@
/* We can use rtas_log_buf now */
no_more_logging = 0;
- DEBUG("will sleep for %d jiffies\n", (HZ*60/rtas_event_scan_rate) / 2);
-
- daemonize("rtasd");
+ printk(KERN_ERR "RTAS daemon started\n");
-#if 0
- /* Rusty unreal time task */
- current->policy = SCHED_FIFO;
- current->nice = sys_sched_get_priority_max(SCHED_FIFO) + 1;
-#endif
+ DEBUG("will sleep for %d jiffies\n", (HZ*60/rtas_event_scan_rate) / 2);
/* See if we have any error stored in NVRAM */
memset(logdata, 0, rtas_error_log_max);
@@ -423,7 +419,9 @@
goto repeat;
error_vfree:
- vfree(rtas_log_buf);
+ if (rtas_log_buf)
+ vfree(rtas_log_buf);
+ rtas_log_buf = NULL;
error:
/* Should delete proc entries */
return -EINVAL;
@@ -450,8 +448,6 @@
if (kernel_thread(rtasd, 0, CLONE_FS) < 0)
printk(KERN_ERR "Failed to start RTAS daemon\n");
-
- printk(KERN_ERR "RTAS daemon started\n");
/* Make room for the sequence number */
rtas_error_log_buffer_max = rtas_error_log_max + sizeof(int);
reply other threads:[~2004-02-16 23:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1076975790.3648.108.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=akpm@osdl.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®