From: Coywolf Qi Hunt <qiyong@fc-cn.com>
To: akpm@osdl.org
Cc: zwane@arm.linux.org.uk, linux-kernel@vger.kernel.org
Subject: [patch] PF_DEAD cleanup
Date: Sat, 8 Oct 2005 18:04:37 +0800 [thread overview]
Message-ID: <20051008100437.GA2799@localhost.localdomain> (raw)
Hello,
The PF_DEAD setting doesn't belong to exit_notify(), move it to a proper place.
Coywolf
Signed-off-by: Coywolf Qi Hunt <qiyong@fc-cn.com>
---
exit.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- 2.6.14-rc3-cy/kernel/exit.c~orig 2005-10-08 17:03:39.000000000 +0800
+++ 2.6.14-rc3-cy/kernel/exit.c 2005-10-08 17:18:03.000000000 +0800
@@ -783,10 +783,6 @@ static void exit_notify(struct task_stru
/* If the process is dead, release it - nobody will wait for it */
if (state == EXIT_DEAD)
release_task(tsk);
-
- /* PF_DEAD causes final put_task_struct after we schedule. */
- preempt_disable();
- tsk->flags |= PF_DEAD;
}
fastcall NORET_TYPE void do_exit(long code)
@@ -869,7 +865,10 @@ fastcall NORET_TYPE void do_exit(long co
tsk->mempolicy = NULL;
#endif
- BUG_ON(!(current->flags & PF_DEAD));
+ /* PF_DEAD causes final put_task_struct after we schedule. */
+ preempt_disable();
+ current->flags |= PF_DEAD;
+
schedule();
BUG();
/* Avoid "noreturn function does return". */
reply other threads:[~2005-10-08 10:04 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=20051008100437.GA2799@localhost.localdomain \
--to=qiyong@fc-cn.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zwane@arm.linux.org.uk \
/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
Powered by JetHome