Re: cgrooups && 2.6.32 -mm merge plans

Oleg Nesterov
2009-09-17T21:12:51Z

On 09/17, Andrew Morton wrote:
>
> On Thu, 17 Sep 2009 22:15:16 +0200
> Oleg Nesterov <oleg@redhat.com> wrote:
>
> > On 09/15, Andrew Morton wrote:
> > >
> > > #cgroups-add-functionality-to-read-write-lock-clone_thread-forking-per-threadgroup.patch: Oleg conniptions
> > > cgroups-add-functionality-to-read-write-lock-clone_thread-forking-per-threadgroup.patch
> > > cgroups-add-functionality-to-read-write-lock-clone_thread-forking-per-threadgroup-fix.patch
> > > cgroups-add-ability-to-move-all-threads-in-a-process-to-a-new-cgroup-atomically.patch
> > >
> > > Merge after checking with Oleg.
> >
> > Well. I think these patches are buggy :/
> >
>
> Well that's never prevented us from merging stuff before.
>
> Thanks, I'll disable the patches for now. Do we have a grip on what's
> wrong and what needs to be done to fix things?

Afaics, ->threadgroup_fork_lock doesn't really work, we can race with exec.

list_for_each_entry_rcu() loops in these patches are not safe.

And in fact, personally I dislike even atomic_inc(&sighand->count). Just
consider sys_unshare(CLONE_SIGHAND). Yes, this code is a joke, but still.

Sadly, I don't have any ideas how to fix this... I'd wish I had a time
to at least try to find the solution ;)

Oleg.