From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 1/3] hfsplus: fixes worst-case unicode to char conversion of file names and attributes Date: Tue, 22 Apr 2014 18:59:28 -0700 Message-ID: <20140422185928.68bbe003.akpm@linux-foundation.org> References: <1398217380.39515.YahooMailBasic@web172302.mail.ir2.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, slava@dubeyko.com, viro@zeniv.linux.org.uk, hch@infradead.org, sougata@tuxera.com To: htl10@users.sourceforge.net Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:51268 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754143AbaDWB6j (ORCPT ); Tue, 22 Apr 2014 21:58:39 -0400 In-Reply-To: <1398217380.39515.YahooMailBasic@web172302.mail.ir2.yahoo.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 23 Apr 2014 02:43:00 +0100 (BST) Hin-Tak Leung wrote: > >+++ a/fs/hfsplus/xattr.c > >@@ -726,6 +726,7 @@ ssize_t hfsplus_listxattr(struct dentry > > > > end_listxattr: > > ______ kfree(strbuf); > >+out: > > ______ hfs_find_exit(&fd); > > ______ return res; > > } > > > >But obviously the patches you sent were not the patches you tested. > >What happened here? > > > > Hi Andrew, > > Am terribly sorry - my fault of using/working/testing under one kernel (3.13.9), > then cherry-picking onto Linus' HEAD and collapsing there. A couple of small > changes got dropped/messed up. There is the missing headers > (#include ) in xattr*.c you spotted in the other mail; the above > is meant to be corrected by re-using the label nearby (as kfree(null) is okay...), rather than adding > a new label. > > diff --git a/fs/hfsplus/xattr.c b/fs/hfsplus/xattr.c > index 3ddf50c..2a38647 100644 > --- a/fs/hfsplus/xattr.c > +++ b/fs/hfsplus/xattr.c > @@ -670,7 +670,7 @@ ssize_t hfsplus_listxattr(struct dentry *dentry, char *buffer, size_t size) > XATTR_MAC_OSX_PREFIX_LEN + 1, GFP_KERNEL); > if (!strbuf) { > res = -ENOMEM; > - goto out; > + goto end_listxattr; > } > > err = hfsplus_find_attr(inode->i_sb, inode->i_ino, NULL, &fd); > > Do you want me to re-submit? I checked the diff of the two branches, it > is just these two issues. > Is OK - what I have now saves 30 cycles on a path which never happens ;) It would help if you could grab tomorrow's linux-next and retest, to check that everything landed OK. How were you testing this anyway? It's a pretty intricate patchset and presumably some effort went into developing the testcases. Perhaps you have something which we can immortalize in tools/testing/selftests/?