From 8a4706493d6155452c2654578d9b90d75b9b86f1 Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Thu, 15 Jul 2004 22:03:51 -0700 Subject: [PATCH] misc sparse cleanups - missing ; between default: and } in sun4setup.c - cast of pointer to unsigned long long instead of unsigned long in x86_64 signal.c - missed annotations for ioctl structure in sparc64 openpromio.h (should've been in the same patch as the rest of drivers/sbus/* annotations) - 0->NULL in list.h and pmdisk.c --- kernel/power/pmdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel') diff --git a/kernel/power/pmdisk.c b/kernel/power/pmdisk.c index d4c20e05a488..318bfb9fa5f8 100644 --- a/kernel/power/pmdisk.c +++ b/kernel/power/pmdisk.c @@ -953,7 +953,7 @@ static const char * __init sanity_check(void) return "machine"; if(pmdisk_info.cpus != num_online_cpus()) return "number of cpus"; - return 0; + return NULL; } -- cgit v1.2.3 From a61b6024bf3994699216d212a2c48e123dca5db1 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 17 Jul 2004 07:51:57 -0700 Subject: Clean up ptrace child exit case. This also fixes it for when the real parent is ignoring SIGCHLD - noted by David Mosberger. --- kernel/exit.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'kernel') diff --git a/kernel/exit.c b/kernel/exit.c index 5d13c054d256..2b2f728220e4 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1018,20 +1018,17 @@ static int wait_task_zombie(task_t *p, unsigned int __user *stat_addr, struct ru if (p->real_parent != p->parent) { __ptrace_unlink(p); p->state = TASK_ZOMBIE; - /* If this is a detached thread, this is where it goes away. */ - if (p->exit_signal == -1) { - /* release_task takes the lock itself. */ - write_unlock_irq(&tasklist_lock); - release_task (p); - } - else { + /* + * If this is not a detached task, notify the parent. If it's + * still not detached after that, don't release it now. + */ + if (p->exit_signal != -1) { do_notify_parent(p, p->exit_signal); - write_unlock_irq(&tasklist_lock); + if (p->exit_signal != -1) + p = NULL; } - p = NULL; } - else - write_unlock_irq(&tasklist_lock); + write_unlock_irq(&tasklist_lock); } if (p != NULL) release_task(p); -- cgit v1.2.3