From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Dave Hansen <dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Cc: Linux Containers
<containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>,
Dave Hansen <haveblue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] checkpoint/restart: refuse checkpoint on detached file
Date: Fri, 5 Dec 2008 16:46:43 -0600 [thread overview]
Message-ID: <20081205224643.GA29599@us.ibm.com> (raw)
In-Reply-To: <1228516454.11768.8.camel@nimitz>
Quoting Dave Hansen (dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org):
> On Thu, 2008-12-04 at 22:41 -0600, Serge E. Hallyn wrote:
> >
> > @@ -158,6 +173,12 @@ cr_write_fd_ent(struct cr_ctx *ctx, struct
> > files_struct *files, int fd)
> > goto out;
> > }
> >
> > + /* Make sure this isn't under some detached tree */
> > + if (file_in_detached_tree(file)) {
> > + ret = -EBADF;
> > + goto out;
> > + }
>
> Looks fine to me. This is racy, though. Right?
>
> There's no locking to keep the thing mounted for the duration of the
> checkpoint.
Oh, hahah, yeah. We have the file pinned so we're not going to
lose any vfsmnt/dentries, but you're right, someone else could
come along and umount -l in the middle.
I suppose we could hold the namespace sem but it doesn't seem worth
it and could deadlock.
Patch withdrawn for now :)
-serge
next prev parent reply other threads:[~2008-12-05 22:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-05 4:41 [PATCH] checkpoint/restart: refuse checkpoint on detached file Serge E. Hallyn
[not found] ` <20081205044141.GA1444-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-12-05 22:34 ` Dave Hansen
2008-12-05 22:46 ` Serge E. Hallyn [this message]
[not found] ` <20081205224643.GA29599-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-12-05 22:53 ` Dave Hansen
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=20081205224643.GA29599@us.ibm.com \
--to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=haveblue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox