From: Wu Fengguang <fengguang.wu@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Van Hensbergen <ericvh@gmail.com>,
Latchesar Ionkov <lucho@ionkov.net>,
v9fs-developer@lists.sourceforge.net,
LKML <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: [PATCH] vfs: initialize d_iname to null for long file names
Date: Wed, 26 Nov 2008 21:41:05 +0800 [thread overview]
Message-ID: <20081126134105.GA25795@localhost> (raw)
dentry->d_iname is currently uninitialized for long file names. Init
it to null string to avoid bad behaviors on careless references to it.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
---
diff --git a/fs/dcache.c b/fs/dcache.c
index a1d86c7..29d1768 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -929,6 +929,7 @@ struct dentry *d_alloc(struct dentry * parent, const struct qstr *name)
kmem_cache_free(dentry_cache, dentry);
return NULL;
}
+ dentry->d_iname[0] = '\0';
} else {
dname = dentry->d_iname;
}
next reply other threads:[~2008-11-26 13:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-26 13:41 Wu Fengguang [this message]
2008-11-26 16:45 ` [PATCH] vfs: initialize d_iname to null for long file names Christoph Hellwig
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=20081126134105.GA25795@localhost \
--to=fengguang.wu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=ericvh@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=v9fs-developer@lists.sourceforge.net \
/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).