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:	Fri, 29 Sep 2006 00:52:18 -0700
From:	Matt Helsley <matthltc@...ibm.com>
To:	Paul Jackson <pj@....com>
Cc:	sekharan@...ibm.com, jtk@...ibm.com, jes@....com,
	linux-kernel@...r.kernel.org, linux-audit@...hat.com,
	viro@...iv.linux.org.uk, lse-tech@...ts.sourceforge.net,
	sgrubb@...hat.com, hch@....de
Subject: Re: [Lse-tech] [RFC][PATCH 05/10] Task watchers v2 Register cpuset
	task watcher

On Thu, 2006-09-28 at 19:31 -0700, Paul Jackson wrote:
> Matt wrote:
> 
> > -	cpuset_fork(p);
> >  #ifdef CONFIG_NUMA
> >   	p->mempolicy = mpol_copy(p->mempolicy);
> >   	if (IS_ERR(p->mempolicy)) {
> >   		retval = PTR_ERR(p->mempolicy);
> >   		p->mempolicy = NULL;
> > - 		goto bad_fork_cleanup_cpuset;
> > + 		goto bad_fork_cleanup_delays_binfmt;
> >   	}
> >  	mpol_fix_fork_child_flag(p);
> >  #endif
> >  #ifdef CONFIG_TRACE_IRQFLAGS
> >  	p->irq_events = 0;
> > @@ -1280,13 +1278,11 @@ bad_fork_cleanup_files:
> >  bad_fork_cleanup_security:
> >  	security_task_free(p);
> >  bad_fork_cleanup_policy:
> >  #ifdef CONFIG_NUMA
> >  	mpol_free(p->mempolicy);
> > -bad_fork_cleanup_cpuset:
> >  #endif
> > -	cpuset_exit(p);
> >  bad_fork_cleanup_delays_binfmt:
> 
> 
> The above code, before your change, had the affect that if mpol_copy()
> failed, then the cpusets that were just setup by the cpuset_fork()
> call were undone by a cpuset_exit() call.
> 
> >From what I can tell, after your change, this is no longer done,
> and a failed mpol_copy will leave cpusets in an incorrect state.
> 
> Am I missing something?
> 

If you look in the first patch there's a corresponding
notify_task_watchers(WATCH_TASK_FREE, tsk) below when we get a failure
from INIT. That in turn calls cpuset_exit() because a cpuset_exit()
because a hunk of this patch marks it for execution whenever a task is
freed.

Cheers,
	-Matt Helsley

-
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