Re: [PATCH] namespaces: fix race at task exit

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Serge E. Hallyn
Date: Thursday, January 25, 2007 - 1:36 pm

Quoting Serge E. Hallyn (serue@us.ibm.com):

Of course the problem with this is that the mounts and proc
namespaces now have slightly different lifetimes, and we cannot
use one use count to track both because it's quite possible
that the two last tasks in a namespace could both come to the
release_mounts_namespaces() point at the same time, then both
come to the exit_tasks_namespaces().

So it seems to me we need to either pull one of the two out of
the nsproxy, or add a second use count to the nsproxy.  The
second use count looks kludgier, but uses less space and seems
safer to maintain because at least the lifetime management happens
somewhat close to each other, whereas moving moutns namespace back
outside of nsproxy means going back to a completely differnet meaning
of mnt_ns->count.

Opinions, or other ideas?

thanks,
-serge
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] namespaces: fix race at task exit, Serge E. Hallyn, (Thu Jan 25, 8:05 am)
Re: [PATCH] namespaces: fix race at task exit, Cedric Le Goater, (Thu Jan 25, 8:20 am)
Re: [PATCH] namespaces: fix race at task exit, Eric W. Biederman, (Thu Jan 25, 9:29 am)
Re: [PATCH] namespaces: fix race at task exit, Oleg Nesterov, (Thu Jan 25, 9:39 am)
Re: [PATCH] namespaces: fix race at task exit, Serge E. Hallyn, (Thu Jan 25, 10:35 am)
Re: [PATCH] namespaces: fix race at task exit, Serge E. Hallyn, (Thu Jan 25, 10:36 am)
Re: [PATCH] namespaces: fix race at task exit, Serge E. Hallyn, (Thu Jan 25, 1:36 pm)