From: Dave Hansen <dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@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, 05 Dec 2008 14:53:39 -0800 [thread overview]
Message-ID: <1228517619.11768.14.camel@nimitz> (raw)
In-Reply-To: <20081205224643.GA29599-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
On Fri, 2008-12-05 at 16:46 -0600, Serge E. Hallyn wrote:
> 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 :)
Well, it is better than nothing. We don't have to worry about people
messing with it if we have complete control over the entire
mnt_namespace.
-- Dave
prev parent reply other threads:[~2008-12-05 22:53 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
[not found] ` <20081205224643.GA29599-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-12-05 22:53 ` Dave Hansen [this message]
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=1228517619.11768.14.camel@nimitz \
--to=dave-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=haveblue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=serue-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