From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: Re: [PATCH] checkpoint/restart: refuse checkpoint on detached file Date: Fri, 05 Dec 2008 14:34:14 -0800 Message-ID: <1228516454.11768.8.camel@nimitz> References: <20081205044141.GA1444@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20081205044141.GA1444-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Serge E. Hallyn" Cc: Linux Containers , Dave Hansen List-Id: containers.vger.kernel.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. -- Dave