X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=kernel%2Fexit.c;h=edaa50b5bbfaecc36f1e492e28d9b80ef55b5dae;hb=fa04ae5c09f3dfedbc923c2954a9a26a573833f1;hp=39d35935b3718a6a8161ea6043692168f81f127e;hpb=6c46ada700568897165409e618ed584683838b49;p=powerpc.git diff --git a/kernel/exit.c b/kernel/exit.c index 39d35935b3..edaa50b5bb 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -38,6 +39,8 @@ extern struct task_struct *child_reaper; int getrusage(struct task_struct *, int, struct rusage __user *); +static void exit_mm(struct task_struct * tsk); + static void __unhash_process(struct task_struct *p) { nr_threads--; @@ -209,7 +212,7 @@ static inline int has_stopped_jobs(int pgrp) } /** - * reparent_to_init() - Reparent the calling kernel thread to the init task. + * reparent_to_init - Reparent the calling kernel thread to the init task. * * If a kernel thread is launched as a result of a system call, or if * it ever exits, it should generally reparent itself to init so that @@ -277,7 +280,7 @@ void set_special_pids(pid_t session, pid_t pgrp) */ int allow_signal(int sig) { - if (sig < 1 || sig > _NSIG) + if (!valid_signal(sig) || sig < 1) return -EINVAL; spin_lock_irq(¤t->sighand->siglock); @@ -298,7 +301,7 @@ EXPORT_SYMBOL(allow_signal); int disallow_signal(int sig) { - if (sig < 1 || sig > _NSIG) + if (!valid_signal(sig) || sig < 1) return -EINVAL; spin_lock_irq(¤t->sighand->siglock); @@ -473,7 +476,7 @@ EXPORT_SYMBOL_GPL(exit_fs); * Turn us into a lazy TLB process if we * aren't already.. */ -void exit_mm(struct task_struct * tsk) +static void exit_mm(struct task_struct * tsk) { struct mm_struct *mm = tsk->mm; @@ -517,8 +520,6 @@ static inline void choose_new_parent(task_t *p, task_t *reaper, task_t *child_re */ BUG_ON(p == reaper || reaper->exit_state >= EXIT_ZOMBIE); p->real_parent = reaper; - if (p->parent == p->real_parent) - BUG(); } static inline void reparent_thread(task_t *p, task_t *father, int traced) @@ -845,6 +846,8 @@ fastcall NORET_TYPE void do_exit(long code) for (;;) ; } +EXPORT_SYMBOL_GPL(do_exit); + NORET_TYPE void complete_and_exit(struct completion *comp, long code) { if (comp)