linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re:  + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree
@ 2012-12-17 12:34 Oleg Nesterov
  2012-12-17 15:05 ` Neil Horman
  0 siblings, 1 reply; 13+ messages in thread
From: Oleg Nesterov @ 2012-12-17 12:34 UTC (permalink / raw)
  To: Eric W. Biederman, Pavel Emelyanov, Neil Horman, Daniel Berrange,
	Alexander Viro, Serge Hallyn, Andrew Morton
  Cc: linux-kernel

@@ -455,6 +468,14 @@ static int umh_pipe_setup(struct subproc
 	/* and disallow core files too */
 	current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1};
 
+
+	if (cp->switch_ns) {
+		get_fs_root(cp->cprocess->fs, &root);
+		set_fs_root(current->fs, &root);
+		switch_task_namespaces(current, cp->cprocess->nsproxy);

How? You can't simply change ->nsproxy this way.

If nothing else this breaks sys_getpid(), no?

And a lot more problems, afaics. For example, this thread can continue
to run after, say, this cprocess->nsproxy->pid_ns was already destroyed.
zap_pid_ns_processes() obviously won't see this thread.

Even ->nsproxy itself can go away. Just suppose that the coredumping
task is the only process in this namespace (sub-init).

Oleg.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-12-20 13:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-17 12:34 + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree Oleg Nesterov
2012-12-17 15:05 ` Neil Horman
2012-12-17 16:04   ` Oleg Nesterov
2012-12-17 18:39     ` Neil Horman
2012-12-18 20:06       ` Oleg Nesterov
2012-12-18 20:19         ` Neil Horman
2012-12-18 20:45           ` Eric W. Biederman
2012-12-18 21:53             ` Neil Horman
2012-12-19  4:43               ` Eric W. Biederman
2012-12-19 16:34             ` Oleg Nesterov
2012-12-19 16:22           ` Oleg Nesterov
2012-12-19 20:42             ` Neil Horman
2012-12-20 13:02               ` Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).