From: Jouni Malinen <jkmalinen@gmail.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Nick Piggin <npiggin@suse.de>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Jouni Malinen <j@w1.fi>
Subject: Re: [git pull] vfs series, part 1
Date: Tue, 17 Aug 2010 16:14:58 +0300 [thread overview]
Message-ID: <AANLkTimh30b=Dfv41zQ9Q+rmkmVCP8X7oOtt6VQyw9ap@mail.gmail.com> (raw)
In-Reply-To: <20100810033536.GA31363@ZenIV.linux.org.uk>
On Tue, Aug 10, 2010 at 6:35 AM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> Assorted work from the last cycle; among other things, there's
> a filesystem API change (->evict_inode() series), a lot of truncate
> rework stuff (mostly by Chris) and a bunch of fixes.
Linux 2.6.36-rc1 seemed to break my UML hostfs setup or well, make it
behave in very odd ways.. No matter what directory I'm trying to read
from hostfs in UML, the root directory seems to be returned. I have
hostfs mounted in UML into /mnt/host and "ls /mnt/host" and "ls
/mnt/host/etc" show the same directory. Actually, any unknown
directory like "/mnt/host/does-not-exist" shows the same root
directory.. Obviously something is going quite wrong in mapping the
path name to directory entry.
Based on a quick git bisect, the main part of the issue seems to be
caused or at least triggered by a change in this set:
> hostfs: fix races in dentry_name() and inode_name()
e9193059b1b3733695d5b80e667778311695aa73 is the first bad commit
commit e9193059b1b3733695d5b80e667778311695aa73
Author: Al Viro <viro@zeniv.linux.org.uk>
Date: Sun Jun 6 23:16:34 2010 -0400
hostfs: fix races in dentry_name() and inode_name()
calculating size, then doing allocation, then filling the
path is a Bad Idea(tm), since the ancestors can be renamed,
leading to buffer overrun.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
In addition, reverting just that commit allows hostfs to be used with
2.6.36-rc1. Though, there seems to be some additional issues with
symlinks, so there could be something else related to this change that
is actually causing the problems. The other issues result in memory
allocation failing when reading symlinks:
# ls /mnt/host/
ls: cannot read symbolic link /mnt/host/vmlinuz: Cannot allocate memory
ls: cannot read symbolic link /mnt/host/vmlinuz.old: Cannot allocate memory
(this is not only limited to ls; "ln -s p.patch a.patch; cat a.patch"
results in same from cat)
Other than that, hostfs seems to be working, though.
Any idea what caused this regression and how to fix it properly? I can
work around this by reverting the patch pointed out by git bisect, but
surely that is not the proper fix for the issues.
- Jouni
prev parent reply other threads:[~2010-08-17 13:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-10 3:35 [git pull] vfs series, part 1 Al Viro
2010-08-10 4:24 ` Stephen Rothwell
2010-08-10 4:40 ` Stephen Rothwell
2010-08-10 10:17 ` Nick Piggin
2010-08-17 13:14 ` Jouni Malinen [this message]
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='AANLkTimh30b=Dfv41zQ9Q+rmkmVCP8X7oOtt6VQyw9ap@mail.gmail.com' \
--to=jkmalinen@gmail.com \
--cc=j@w1.fi \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
--cc=torvalds@linux-foundation.org \
--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).