Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756242Ab0LLXwR (ORCPT ); Sun, 12 Dec 2010 18:52:17 -0500 Received: from a.ns.miles-group.at ([95.130.255.143]:49039 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755823Ab0LLXwN convert rfc822-to-8bit (ORCPT ); Sun, 12 Dec 2010 18:52:13 -0500 /m: From: Richard Weinberger To: Andi Kleen Subject: Re: [PATCH] [64/223] hostfs: fix UML crash: remove f_spare from hostfs Date: Mon, 13 Dec 2010 00:51:55 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.25.20-0.7-pae; KDE/4.4.4; i686; ; ) Cc: toralf.foerster@gmx.de, hch@lst.de, viro@zeniv.linux.org.uk, jdike@addtoit.com, akpm@linux-foundation.org, torvalds@linux-foundation.org, gregkh@suse.de, ak@linux.intel.com, linux-kernel@vger.kernel.org, stable@kernel.org References: <201012131244.547034648@firstfloor.org> <20101212234602.5DAB5B27BF@basil.firstfloor.org> In-Reply-To: <20101212234602.5DAB5B27BF@basil.firstfloor.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 8BIT Message-Id: <201012130051.55692.richard@nod.at> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3583 Lines: 95 Andi, Am Montag 13 Dezember 2010, 00:46:02 schrieb Andi Kleen: > 2.6.35-longterm review patch. If anyone has any objections, please let me > know. This patch is not needed on 2.6.35. It makes only sense on >= 2.6.36. Thanks, //richard > ------------------ > From: Richard Weinberger > > commit 1b627d5771312c92404b66f0a0b16f66036dd2e1 upstream. > > 365b1818 ("add f_flags to struct statfs(64)") resized f_spare within > struct statfs which caused a UML crash. There is no need to copy f_spare. > > Signed-off-by: Richard Weinberger > Reported-by: Toralf Förster > Tested-by: Toralf Förster > Cc: Christoph Hellwig > Cc: Al Viro > Cc: Jeff Dike > Signed-off-by: Andrew Morton > Signed-off-by: Linus Torvalds > Signed-off-by: Greg Kroah-Hartman > Signed-off-by: Andi Kleen > > --- > fs/hostfs/hostfs.h | 3 +-- > fs/hostfs/hostfs_kern.c | 2 +- > fs/hostfs/hostfs_user.c | 9 ++------- > 3 files changed, 4 insertions(+), 10 deletions(-) > > Index: linux/fs/hostfs/hostfs.h > =================================================================== > --- linux.orig/fs/hostfs/hostfs.h > +++ linux/fs/hostfs/hostfs.h > @@ -86,7 +86,6 @@ extern int rename_file(char *from, char > extern int do_statfs(char *root, long *bsize_out, long long *blocks_out, > long long *bfree_out, long long *bavail_out, > long long *files_out, long long *ffree_out, > - void *fsid_out, int fsid_size, long *namelen_out, > - long *spare_out); > + void *fsid_out, int fsid_size, long *namelen_out); > > #endif > Index: linux/fs/hostfs/hostfs_kern.c > =================================================================== > --- linux.orig/fs/hostfs/hostfs_kern.c > +++ linux/fs/hostfs/hostfs_kern.c > @@ -272,7 +272,7 @@ int hostfs_statfs(struct dentry *dentry, > err = do_statfs(HOSTFS_I(dentry->d_sb->s_root->d_inode)->host_filename, > &sf->f_bsize, &f_blocks, &f_bfree, &f_bavail, &f_files, > &f_ffree, &sf->f_fsid, sizeof(sf->f_fsid), > - &sf->f_namelen, sf->f_spare); > + &sf->f_namelen); > if (err) > return err; > sf->f_blocks = f_blocks; > Index: linux/fs/hostfs/hostfs_user.c > =================================================================== > --- linux.orig/fs/hostfs/hostfs_user.c > +++ linux/fs/hostfs/hostfs_user.c > @@ -402,8 +402,7 @@ int rename_file(char *from, char *to) > int do_statfs(char *root, long *bsize_out, long long *blocks_out, > long long *bfree_out, long long *bavail_out, > long long *files_out, long long *ffree_out, > - void *fsid_out, int fsid_size, long *namelen_out, > - long *spare_out) > + void *fsid_out, int fsid_size, long *namelen_out) > { > struct statfs64 buf; > int err; > @@ -422,10 +421,6 @@ int do_statfs(char *root, long *bsize_ou > sizeof(buf.f_fsid) > fsid_size ? fsid_size : > sizeof(buf.f_fsid)); > *namelen_out = buf.f_namelen; > - spare_out[0] = buf.f_spare[0]; > - spare_out[1] = buf.f_spare[1]; > - spare_out[2] = buf.f_spare[2]; > - spare_out[3] = buf.f_spare[3]; > - spare_out[4] = buf.f_spare[4]; > + > return 0; > } -- 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/