lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 May 2009 20:28:40 +0400
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	akpm@...ux-foundation.org
Cc:	linux-kernel@...r.kernel.org,
	containers@...ts.linux-foundation.org,
	torvalds@...ux-foundation.org, xemul@...allels.com,
	orenl@...columbia.edu, serue@...ibm.com, dave@...ux.vnet.ibm.com,
	mingo@...e.hu
Subject: Re: [PATCH 18/38] C/R: core stuff

On Fri, May 22, 2009 at 08:55:12AM +0400, Alexey Dobriyan wrote:
> +static int task_struct_restorer(void *_tsk_ctx)
> +{
> +	struct task_struct_restore_context *tsk_ctx = _tsk_ctx;
> +	struct kstate_image_task_struct *i = tsk_ctx->i;
> +	struct kstate_context *ctx = tsk_ctx->ctx;
> +	/* In the name of symmetry. */
> +	struct task_struct *tsk = current, *real_parent;
> +	int rv;
> +
> +	pr_debug("%s: ENTER tsk %p/%s\n", __func__, tsk, tsk->comm);
> +
> +	write_lock_irq(&tasklist_lock);
> +	real_parent = ctx->init_tsk->nsproxy->pid_ns->child_reaper;
> +	tsk->real_parent = tsk->parent = real_parent;
> +	list_move_tail(&tsk->sibling, &tsk->real_parent->sibling);
							 ^^^^^^^
> +	write_unlock_irq(&tasklist_lock);

Eek, what a stupid bug here


commit 2c4b5f5d606a1892b702d95a0e4d29f207685381
Author: Alexey Dobriyan <adobriyan@...il.com>
Date:   Wed May 27 20:21:59 2009 +0400

    C/R: fix stupid bug in reparenting
    
    Child process should be added to ->children list of course
    
    Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>

diff --git a/kernel/kstate/kstate-task.c b/kernel/kstate/kstate-task.c
index 9ed5a19..6df7d25 100644
--- a/kernel/kstate/kstate-task.c
+++ b/kernel/kstate/kstate-task.c
@@ -490,7 +490,7 @@ static int task_struct_restorer(void *_tsk_ctx)
 		real_parent = tmp->o_obj;
 	}
 	tsk->real_parent = tsk->parent = real_parent;
-	list_move_tail(&tsk->sibling, &tsk->real_parent->sibling);
+	list_move_tail(&tsk->sibling, &tsk->real_parent->children);
 	write_unlock_irq(&tasklist_lock);
 
 	rv = restore_mm(ctx, &i->ref_mm);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ