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] [day] [month] [year] [list]
Message-ID: <87mwz0fjzp.fsf@xmission.com>
Date:	Fri, 02 Nov 2012 02:10:34 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Gao feng <gaofeng@...fujitsu.com>
Cc:	linux-kernel@...r.kernel.org, containers@...ts.linux-foundation.org
Subject: Re: [PATCH] namespace:unmount pid_namespace's proc_mnt when copy_net_ns failed

Gao feng <gaofeng@...fujitsu.com> writes:

> 于 2012年11月02日 16:54, Eric W. Biederman 写道:
>> Gao feng <gaofeng@...fujitsu.com> writes:
>> 
>>> 于 2012年11月02日 15:02, Eric W. Biederman 写道:
>>>> Gao feng <gaofeng@...fujitsu.com> writes:
>>>>
>>>>> we should call pid_ns_release_proc to unmount pid_namespace's
>>>>> proc_mnt when copy_net_ns failed in function create_new_namespaces.
>>>>>
>>>>> otherwise,the proc_mnt will not be freed and because the super_block
>>>>> of proc_mnt also add the reference of the pid_namespace,so this
>>>>> pid_namespace will never be released too.
>>>>
>>>> Ouch!
>>>>
>>>> Have you encountered this failure in practice or is this just from
>>>> review?
>>>
>>> I add some printk in pid_ns_release_proc,it's not called in above case.
>>> when copy_net_ns failed,this pid_namespace is not used by any task,
>>> so proc_flush_task can't call pid_ns_release_proc to umount this pidns->proc_mnt.
>>> it's the only chance we can unmount this pindns->proc_mnt.
>>>
>>> With this patch,everything runs well.
>> 
>> I have reviewed the code and I don't doubt that this is necessary.
>> 
>> What caused you to look into this failure?  Is there some semi-practical
>> real world case that someone is hitting?
>> 
>
> So far,there is no case hitting this problem.

I think what I want to do is to push the changes in my userns
development tree instead of solving it the way you have solved it.

The way things are currently structured I don't think we can be certain
of finding all of the corner cases.

Would you be interesting in confirming that problem does not exist in my
userns development branch?

Eric
--
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