+ fix-tsk-exit_state-usage-resend.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Fix tsk->exit_state usage
has been added to the -mm tree.  Its filename is
     fix-tsk-exit_state-usage-resend.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: Fix tsk->exit_state usage
From: Eugene Teo <eugeneteo@xxxxxxxxx>

tsk->exit_state can only be 0, EXIT_ZOMBIE, or EXIT_DEAD.  A non-zero test
is the same as tsk->exit_state & (EXIT_ZOMBIE | EXIT_DEAD), so just testing
tsk->exit_state is sufficient.

Signed-off-by: Eugene Teo <eugeneteo@xxxxxxxxx>
Cc: Roland McGrath <roland@xxxxxxxxxx>
Cc: Oleg Nesterov <oleg@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/proc/array.c |    3 +--
 kernel/fork.c   |    2 +-
 kernel/sched.c  |    2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff -puN fs/proc/array.c~fix-tsk-exit_state-usage-resend fs/proc/array.c
--- a/fs/proc/array.c~fix-tsk-exit_state-usage-resend
+++ a/fs/proc/array.c
@@ -146,8 +146,7 @@ static inline const char *get_task_state
 					    TASK_UNINTERRUPTIBLE |
 					    TASK_STOPPED |
 					    TASK_TRACED)) |
-			(tsk->exit_state & (EXIT_ZOMBIE |
-					    EXIT_DEAD));
+					   tsk->exit_state;
 	const char **p = &task_state_array[0];
 
 	while (state) {
diff -puN kernel/fork.c~fix-tsk-exit_state-usage-resend kernel/fork.c
--- a/kernel/fork.c~fix-tsk-exit_state-usage-resend
+++ a/kernel/fork.c
@@ -116,7 +116,7 @@ EXPORT_SYMBOL(free_task);
 
 void __put_task_struct(struct task_struct *tsk)
 {
-	WARN_ON(!(tsk->exit_state & (EXIT_DEAD | EXIT_ZOMBIE)));
+	WARN_ON(!tsk->exit_state);
 	WARN_ON(atomic_read(&tsk->usage));
 	WARN_ON(tsk == current);
 
diff -puN kernel/sched.c~fix-tsk-exit_state-usage-resend kernel/sched.c
--- a/kernel/sched.c~fix-tsk-exit_state-usage-resend
+++ a/kernel/sched.c
@@ -5234,7 +5234,7 @@ static void migrate_dead(unsigned int de
 	struct rq *rq = cpu_rq(dead_cpu);
 
 	/* Must be exiting, otherwise would be on tasklist. */
-	BUG_ON(p->exit_state != EXIT_ZOMBIE && p->exit_state != EXIT_DEAD);
+	BUG_ON(!p->exit_state);
 
 	/* Cannot have done final schedule yet: would have vanished. */
 	BUG_ON(p->state == TASK_DEAD);
_

Patches currently in -mm which might be from eugeneteo@xxxxxxxxx are

git-alsa.patch
git-netdev-all.patch
drivers-video-geode-lxfb_corec-fix-lxfb_setup-warning.patch
fix-tsk-exit_state-usage-resend.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux