From: Boqun Feng <boqun.feng@gmail.com>
To: linux-fsdevel@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Cc: Andreas Dilger <andreas.dilger@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Boqun Feng <boqun.feng@gmail.com>,
Oleg Drokin <oleg.drokin@intel.com>,
Al Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>
Subject: [PATCH 0/2] staging: lustre: Replace ll_getname with vfs' getname
Date: Wed, 22 Apr 2015 11:50:22 +0800 [thread overview]
Message-ID: <1429674624-25922-1-git-send-email-boqun.feng@gmail.com> (raw)
As Al Viro pointed out:
https://lkml.org/lkml/2015/4/11/243
There are bugs in ll_getname() because of wrong assumptions of returning
values from strncpy_from_user(). Moreover, what ll_getname want to do is
just to try copy the file name from userland. Since we already have
getname() for the same purpose, it's better to replace ll_getname() with
getname().
To do that, we need to:
1) export the symbols of getname() and putname() to be used by modules.
2) actually replace ll_getname()/ll_putname() with getname()/putname().
One more thing is that as ll_getname() and getname() both treat a zero-length
file name as an error(-ENOENT), and if ll_getname() or getname() has an error,
ll_dir_ioctl() will return the error immediately, so checking whether these names
are zero-length is unnecessary and -ENIVAL shall not return from that code path,
no matter using ll_getname() or getname(). So remove the checking code.
This patchset is based on v4.0, and I only did build tests, because I found a
little difficult to set up a lustre environment. I'll try to do the testing once
I'm able to set up an environment, in the meanwhile, comments,
inputs from lustre's point of view and voluntary tests are welcome. Thank you. ;-)
Regards,
Boqun Feng
Boqun Feng (2):
vfs: Export symbol 'getname' and 'putname'
staging: lustre: replace ll_{get,put}name() with {get,put}name()
drivers/staging/lustre/lustre/llite/dir.c | 60 ++++++----------------
.../staging/lustre/lustre/llite/llite_internal.h | 2 +-
drivers/staging/lustre/lustre/llite/namei.c | 2 +-
fs/namei.c | 18 +++++++
4 files changed, 36 insertions(+), 46 deletions(-)
--
2.3.5
next reply other threads:[~2015-04-22 3:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-22 3:50 Boqun Feng [this message]
2015-04-22 3:50 ` [PATCH 1/2] vfs: export symbol 'getname' and 'putname' Boqun Feng
2015-04-22 5:53 ` Christoph Hellwig
2015-04-22 6:27 ` Drokin, Oleg
2015-04-22 6:31 ` Christoph Hellwig
2015-04-22 6:49 ` Drokin, Oleg
2015-04-22 7:34 ` Christoph Hellwig
2015-04-24 2:38 ` Drokin, Oleg
2015-04-22 6:31 ` Greg Kroah-Hartman
2015-04-22 6:40 ` Drokin, Oleg
2015-04-22 3:50 ` [PATCH 2/2] staging: lustre: replace ll_{get, put}name() with {get, put}name() Boqun Feng
2015-04-22 5:45 ` [PATCH 2/2] staging: lustre: replace ll_{get,put}name() with {get,put}name() Dilger, Andreas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1429674624-25922-1-git-send-email-boqun.feng@gmail.com \
--to=boqun.feng@gmail.com \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg.drokin@intel.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).