Index: kernel/fork.c =================================================================== RCS file: /export/cvsroot/SLES9_kernel/kernel/fork.c,v retrieving revision 1.1.1.3.12.1 diff -u -r1.1.1.3.12.1 fork.c --- kernel/fork.c 27 May 2005 05:17:01 -0000 1.1.1.3.12.1 +++ kernel/fork.c 17 Jun 2005 00:39:33 -0000 @@ -1086,7 +1086,7 @@ if (sigismember(¤t->pending.signal, SIGKILL)) { write_unlock_irq(&tasklist_lock); retval = -EINTR; - goto bad_fork_cleanup_namespace; + goto bad_fork_cleanup_pagg; } /* CLONE_PARENT re-uses the old parent */ @@ -1107,7 +1107,7 @@ spin_unlock(¤t->sighand->siglock); write_unlock_irq(&tasklist_lock); retval = -EAGAIN; - goto bad_fork_cleanup_namespace; + goto bad_fork_cleanup_pagg; } p->group_leader = current->group_leader; @@ -1149,8 +1149,9 @@ return ERR_PTR(retval); return p; -bad_fork_cleanup_namespace: +bad_fork_cleanup_pagg: pagg_detach(p); +bad_fork_cleanup_namespace: exit_namespace(p); bad_fork_cleanup_mm: exit_mm(p); Index: kernel/pagg.c =================================================================== RCS file: /export/cvsroot/SLES9_kernel/kernel/Attic/pagg.c,v retrieving revision 1.1.1.1.12.1 diff -u -r1.1.1.1.12.1 pagg.c --- kernel/pagg.c 27 May 2005 05:17:01 -0000 1.1.1.1.12.1 +++ kernel/pagg.c 17 Jun 2005 00:39:33 -0000 @@ -410,14 +410,15 @@ goto error_return; } ret = to_pagg->hook->attach(to_task, to_pagg, from_pagg->data); - - if (ret < 0) { - /* Propagates to copy_process as a fork failure */ - goto error_return; - } - else if (ret > 0) { - /* Success, but attach function pointer doesn't want grouping */ + if (ret) { + /* Negative error propagates to copy_process + * as a fork failure. Otherwise we have + * success, but the attach function pointer + * doesn't want grouping. + */ pagg_free(to_pagg); + if (ret < 0) + goto error_return; } }