Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939125AbXFHHws (ORCPT ); Fri, 8 Jun 2007 03:52:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S938394AbXFHHZN (ORCPT ); Fri, 8 Jun 2007 03:25:13 -0400 Received: from 216-99-217-87.dsl.aracnet.com ([216.99.217.87]:55344 "EHLO sous-sol.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967783AbXFHHZG (ORCPT ); Fri, 8 Jun 2007 03:25:06 -0400 Message-Id: <20070608072150.032149000@sous-sol.org> References: <20070608072127.352723000@sous-sol.org> User-Agent: quilt/0.46-1 Date: Fri, 08 Jun 2007 00:21:34 -0700 From: Chris Wright To: linux-kernel@vger.kernel.org, stable@kernel.org, akpm@linux-foundation.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , torvalds@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Miklos Szeredi , Miklos Szeredi , Greg Kroah-Hartman Subject: [patch 07/54] fuse: fix mknod of regular file Content-Disposition: inline; filename=fuse-fix-mknod-of-regular-file.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1294 Lines: 38 -stable review patch. If anyone has any objections, please let us know. --------------------- From: Miklos Szeredi The wrong lookup flag was tested in ->create() causing havoc (error or Oops) when a regular file was created with mknod() in a fuse filesystem. Thanks to J. Cameijo Cerdeira for the report. Kernels 2.6.18 onward are affected. Please apply to -stable as well. Signed-off-by: Miklos Szeredi Signed-off-by: Chris Wright Signed-off-by: Greg Kroah-Hartman --- fs/fuse/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-2.6.21.4.orig/fs/fuse/dir.c +++ linux-2.6.21.4/fs/fuse/dir.c @@ -485,7 +485,7 @@ static int fuse_mknod(struct inode *dir, static int fuse_create(struct inode *dir, struct dentry *entry, int mode, struct nameidata *nd) { - if (nd && (nd->flags & LOOKUP_CREATE)) { + if (nd && (nd->flags & LOOKUP_OPEN)) { int err = fuse_create_open(dir, entry, mode, nd); if (err != -ENOSYS) return err; -- - 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/