All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Oren Laadan <orenl@cs.columbia.edu>
Cc: Linus Torvalds <torvalds@osdl.org>,
	containers@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-api@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Dave Hansen <dave@linux.vnet.ibm.com>,
	Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: [RFC v8][PATCH 0/12] Kernel based checkpoint/restart
Date: Tue, 4 Nov 2008 15:38:05 -0600	[thread overview]
Message-ID: <20081104213805.GA14737@us.ibm.com> (raw)
In-Reply-To: <1225374675-22850-1-git-send-email-orenl@cs.columbia.edu>

Quoting Oren Laadan (orenl@cs.columbia.edu):
> Basic checkpoint-restart [C/R]: v8 adds support for "external" checkpoint
> and improves documentation. Older announcements below.

Finally!

>From 8edab186b605f7dddd612e581204f1ad8fd766be Mon Sep 17 00:00:00 2001
From: Serge Hallyn <serue@us.ibm.com>
Date: Tue, 4 Nov 2008 15:28:01 -0600
Subject: [PATCH 1/1] cr: fix use of __d_path()

__d_path():
	1. should be used under dcache_lock
	2. can change root->{mnt,dentry} without changing refcounts
The second point was the cause of my BUGs.  The ctx->root was passed
in, and do_checkpoint() had taken a path_get on the vfsroot.  So now
at cleanup it was doing path_put() using another mnt+dentry.

(Why they are different, I'm not sure - but my guess would be that
stdin or stdout is inherited from the parent task in parent mntns,
hence file->mnt is different from root->mnt as it's a different
namespace.)

Signed-off-by: Serge Hallyn <serue@us.ibm.com>
---
 checkpoint/checkpoint.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/checkpoint/checkpoint.c b/checkpoint/checkpoint.c
index 173b637..7f0c1e7 100644
--- a/checkpoint/checkpoint.c
+++ b/checkpoint/checkpoint.c
@@ -70,9 +70,20 @@ static char *
 cr_fill_fname(struct path *path, struct path *root, char *buf, int *n)
 {
 	char *fname;
+	struct path root2;
+
+	root2.mnt = root->mnt;
+	root2.dentry = root->dentry;
 
 	BUG_ON(!buf);
-	fname = __d_path(path, root, buf, *n);
+	spin_lock(&dcache_lock);
+	fname = __d_path(path, &root2, buf, *n);
+	spin_unlock(&dcache_lock);
+	if (root2.mnt != root->mnt)
+		printk(KERN_NOTICE "%s: mnt changed\n", __func__);
+	if (root2.dentry != root->dentry)
+		printk(KERN_NOTICE "%s: dentry changed\n", __func__);
+	fname = buf+10;
 	if (!IS_ERR(fname))
 		*n = (buf + (*n) - fname);
 	return fname;
-- 
1.5.6.3

WARNING: multiple messages have this Message-ID (diff)
From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Oren Laadan <orenl@cs.columbia.edu>
Cc: Linus Torvalds <torvalds@osdl.org>,
	containers@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-api@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Dave Hansen <dave@linux.vnet.ibm.com>,
	Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: [RFC v8][PATCH 0/12] Kernel based checkpoint/restart
Date: Tue, 4 Nov 2008 15:38:05 -0600	[thread overview]
Message-ID: <20081104213805.GA14737@us.ibm.com> (raw)
In-Reply-To: <1225374675-22850-1-git-send-email-orenl@cs.columbia.edu>

Quoting Oren Laadan (orenl@cs.columbia.edu):
> Basic checkpoint-restart [C/R]: v8 adds support for "external" checkpoint
> and improves documentation. Older announcements below.

Finally!

  parent reply	other threads:[~2008-11-04 21:38 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30 13:51 [RFC v8][PATCH 0/12] Kernel based checkpoint/restart Oren Laadan
2008-10-30 13:51 ` Oren Laadan
2008-10-30 13:51 ` Oren Laadan
2008-10-30 13:51 ` [RFC v8][PATCH 06/12] Dump memory address space Oren Laadan
2008-10-30 13:51   ` Oren Laadan
     [not found] ` <1225374675-22850-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-10-30 13:51   ` [RFC v8][PATCH 01/12] Create syscalls: sys_checkpoint, sys_restart Oren Laadan
2008-10-30 13:51   ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51   ` [RFC v8][PATCH 02/12] Checkpoint/restart: initial documentation Oren Laadan
2008-10-30 13:51   ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51   ` [RFC v8][PATCH 03/12] Make file_pos_read/write() public Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51   ` Oren Laadan
2008-10-30 13:51   ` [RFC v8][PATCH 04/12] General infrastructure for checkpoint restart Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51   ` Oren Laadan
2008-10-30 13:51   ` [RFC v8][PATCH 05/12] x86 support for checkpoint/restart Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-11-04  9:30     ` Masahiko Takahashi
2008-11-04  9:30       ` Masahiko Takahashi
     [not found]       ` <1225791016.5940.33.camel-eKIOortEDzKlX1Gi5MogR0v2NXO6HgA6@public.gmane.org>
2008-11-04 15:32         ` Oren Laadan
2008-11-04 15:32           ` Oren Laadan
2008-11-04 15:32           ` Oren Laadan
2008-10-30 13:51   ` Oren Laadan
2008-10-30 13:51   ` [RFC v8][PATCH 06/12] Dump memory address space Oren Laadan
2008-10-30 13:51   ` [RFC v8][PATCH 07/12] Restore " Oren Laadan
2008-10-30 13:51   ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51   ` [RFC v8][PATCH 08/12] Infrastructure for shared objects Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51   ` Oren Laadan
2008-10-30 13:51   ` [RFC v8][PATCH 09/12] Dump open file descriptors Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan
     [not found]     ` <1225374675-22850-10-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-11-03 20:57       ` Serge E. Hallyn
2008-11-03 20:57         ` Serge E. Hallyn
2008-11-03 20:57         ` Serge E. Hallyn
2008-11-03 20:57       ` Serge E. Hallyn
2008-10-30 13:51   ` Oren Laadan
2008-10-30 13:51   ` [RFC v8][PATCH 10/12] Restore open file descriprtors Oren Laadan
2008-10-30 13:51   ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51   ` [RFC v8][PATCH 11/12] External checkpoint of a task other than ourself Oren Laadan
2008-10-30 13:51   ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan
     [not found]     ` <1225374675-22850-12-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-10-31  2:41       ` Serge E. Hallyn
2008-10-31  2:41         ` Serge E. Hallyn
2008-10-31  2:41         ` Serge E. Hallyn
2008-10-31  2:41       ` Serge E. Hallyn
2008-10-31 13:58       ` Serge E. Hallyn
2008-10-31 13:58       ` Serge E. Hallyn
2008-10-31 13:58         ` Serge E. Hallyn
2008-10-31 13:58         ` Serge E. Hallyn
2008-10-30 13:51   ` [RFC v8][PATCH 12/12] Track in-kernel when we expect checkpoint/restart to work Oren Laadan
2008-10-30 13:51   ` Oren Laadan
2008-10-30 13:51     ` Oren Laadan, Dave Hansen
2008-10-30 13:51     ` Oren Laadan
2008-10-30 14:45   ` [Devel] [RFC v8][PATCH 0/12] Kernel based checkpoint/restart Andrey Mirkin
2008-11-04 18:44   ` Serge E. Hallyn
2008-11-04 18:44   ` Serge E. Hallyn
2008-11-04 18:44     ` Serge E. Hallyn
2008-11-04 18:44     ` Serge E. Hallyn
2008-11-04 21:38   ` Serge E. Hallyn
2008-10-30 14:45 ` [Devel] " Andrey Mirkin
2008-10-30 14:45   ` Andrey Mirkin
2008-10-30 15:59   ` Oren Laadan
2008-10-30 15:59     ` Oren Laadan
     [not found]   ` <200810301745.45068.major-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2008-10-30 15:59     ` Oren Laadan
2008-11-04 21:38 ` Serge E. Hallyn [this message]
2008-11-04 21:38   ` Serge E. Hallyn
  -- strict thread matches above, loose matches on Subject: below --
2008-10-30 13:51 Oren Laadan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081104213805.GA14737@us.ibm.com \
    --to=serue@us.ibm.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=hpa@zytor.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@elte.hu \
    --cc=orenl@cs.columbia.edu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@osdl.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.