Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755198AbYKJUgN (ORCPT ); Mon, 10 Nov 2008 15:36:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753811AbYKJUf5 (ORCPT ); Mon, 10 Nov 2008 15:35:57 -0500 Received: from serrano.cc.columbia.edu ([128.59.29.6]:46769 "EHLO serrano.cc.columbia.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753843AbYKJUfy (ORCPT ); Mon, 10 Nov 2008 15:35:54 -0500 Message-ID: <49189ADD.7030607@cs.columbia.edu> Date: Mon, 10 Nov 2008 15:34:37 -0500 From: Oren Laadan Organization: Columbia University User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 To: "Serge E. Hallyn" CC: Andrew Morton , Linus Torvalds , containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org, Thomas Gleixner , Dave Hansen , Ingo Molnar , "H. Peter Anvin" , Alexander Viro Subject: Re: [RFC v9][PATCH 05/13] Dump memory address space References: <1226335060-7061-1-git-send-email-orenl@cs.columbia.edu> <1226335060-7061-6-git-send-email-orenl@cs.columbia.edu> <20081110201251.GA7471@us.ibm.com> In-Reply-To: <20081110201251.GA7471@us.ibm.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-No-Spam-Score: Local Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1224 Lines: 43 Serge E. Hallyn wrote: > Quoting Oren Laadan (orenl@cs.columbia.edu): >> +/** >> + * cr_fill_fname - return pathname of a given file >> + * @path: path name >> + * @root: relative root >> + * @buf: buffer for pathname >> + * @n: buffer length (in) and pathname length (out) >> + */ >> +static char * >> +cr_fill_fname(struct path *path, struct path *root, char *buf, int *n) >> +{ >> + struct path tmp = *root; >> + char *fname; >> + >> + BUG_ON(!buf); >> + fname = __d_path(path, &tmp, buf, *n); >> + if (!IS_ERR(fname)) >> + *n = (buf + (*n) - fname); >> + /* >> + * FIXME: if __d_path() changed these, it must have stepped out of >> + * init's namespace. Since currently we require a unified namespace >> + * within the container: simply fail. >> + */ >> + if (tmp.mnt != root->mnt || tmp.dentry != root->dentry) >> + fname = ERR_PTR(-EBADF); >> + >> + return fname; >> +} > > You still are not taking the dcache_lock around __d_path. > You still are right. Oren. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/